2012-02-06 5 views
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(); 
+0

あなたはvar activeVariableにメディアプレーヤーを設定していますが、アクティブにする必要があります.open()、または表示可能な領域などに設定してください。私はこのマシンにチタニウムのものを持っていませんが、それを見てもう一つのステップがあるようですね?あなたは他のビデオフォーマットを試しましたか?パスは正しいですか? –

答えて

1

動画プレーヤーはウィンドウに追加されませんでした。試してみてください:win.add(activeVideo);

関連する問題