0
ボタンをクリックして.mp4を再生しようとしています。チタンモバイル動画のAndroidが動作しない
が1.7.5:ブラックスクリーンを押すときは、ボタン 1.8.0.1 & 1.8.1:何もイベントがアラート「テストとして登録されている
起こりません私は、別のSDKのをHERESに結果を、これをテストしてみました'がコメントされていない場合は動作しています。以下は私のコードです:
// Create main window
var win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
// Initialize the variable that will hold the playing video
var activeVideo;
// Create a play button
var button = Ti.UI.createButton({
title: 'Play Video',
});
// Add the button to the window
win.add(button);
// Listen for a 'click' on the button
button.addEventListener('click', function() {
// alert('Test');
// Create the media player
activeVideo = Ti.Media.createVideoPlayer({
url: 'video.mp4',
autoplay: true
});
});
// Open the window
win.open();
あなたはvar activeVariableにメディアプレーヤーを設定していますが、アクティブにする必要があります.open()、または表示可能な領域などに設定してください。私はこのマシンにチタニウムのものを持っていませんが、それを見てもう一つのステップがあるようですね?あなたは他のビデオフォーマットを試しましたか?パスは正しいですか? –