Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1324] iPhone Video Player enhancement

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:55:52.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsiOS
Labelsenhancement, ios, iphone, pause, player, video
Reporterctredway
AssigneeBlain Hamon
Created2011-04-15T02:49:26.000+0000
Updated2011-04-17T01:55:52.000+0000

Description

I believe we need to add a pause method to the video player. I have seen a few requests for this in the help desk.

Comments

  1. Blain Hamon 2011-04-15

    Which version of iPhone OS are they using? We do support pause in 3.2 and later, because the iPhone OS in 3.2 and later supports pause. In 3.1, however, the underlying MPMoviePlayerController does not have a pause method.

  2. ctredway 2011-04-15

    Since our docs nor the kitchen sink have the syntax for this, how do we use it?

  3. Stephen Tramer 2011-04-15

    pause().

    I have updated the documentation.

  4. Pedro Enrique 2011-04-15

    Although the video player has it's own button built in, I tested the following code and the pause() works fine.

       var win = Ti.UI.createWindow();
       var activeMovie = Titanium.Media.createVideoPlayer({
           contentURL:'movie.mp4'
       });
       win.add(activeMovie);
       var button1 = Ti.UI.createButton({title:'play'});
       var button2 = Ti.UI.createButton({title:'pause'});
       var button3 = Ti.UI.createButton({title:'stop'});
       win.setToolbar([button1,button2,button3]);
       win.open({modal:true});
       
       //play button click
       button1.addEventListener('click',function(){
           activeMovie.play();
       });
       //pause button click
       button2.addEventListener('click',function(){
           activeMovie.pause();
       });
       //stop button click
       button3.addEventListener('click',function(){
           activeMovie.stop();
       });
       

    resolved

JSON Source