Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11779] iOS: iPad - "DONE" button not working in Fullscreen video

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-05-06T09:00:05.000+0000
Affected Version/sRelease 2.1.4
Fix Version/s2013 Sprint 09
ComponentsiOS
Labelsn/a
ReporterEduardo Gomez
Assigneejithinpv
Created2012-11-15T16:58:39.000+0000
Updated2014-06-19T12:43:25.000+0000

Description

Issue

App is not able to get fullscreen video to close properly on an iPad device/simulator. Also, _complete_ event listener gets fired twice
[INFO] 1BestPractices/1.0 (2.1.4.GA.51f2c64)
[INFO] Movie Complete
[INFO] Movie Complete

Expected results

Get window closed when "DONE" button get clicked

Tested on

iOS 5.1.5 iPad Simulator On iOS 6 is not reproducible

Steps to reproduce

1. Grab and paste app.js below 2. Run in iPad simulator 3. Hold till video get played 4. Click "DONE" button, notice how the Fullscreen video can't be get closed 5. Repeat steps 1 to 4 on iOS 6 - the DONE button might work in such Ti SDK

Repro sequence

function playFullscreenVideo(videoUrl) {
    var win = Ti.UI.createWindow({
          orientationModes: [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT]
    });
    var player = Ti.Media.createVideoPlayer({
        mediaControlStyle: Ti.Media.VIDEO_CONTROL_FULLSCREEN,
        scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FIT,
        fullscreen: true,
        url: videoUrl
    });
    player.addEventListener('complete', function(e) {
        Ti.API.info('Movie Complete');
        //player.setFullscreen(false);//Added
        player.stop();
        player.release();
        win.close();
    });
    player.addEventListener('fullscreen', function(e) {
        if (!e.entering) {
            Ti.API.info('Entering fullscreen');
            player.stop();
            player.release();
            win.close();
        }
    });
    win.add(player);
    win.open();
}
 
//Providing x video ... 
var contentURL = 'http://movies.apple.com/media/us/ipad/2010/tours/apple-ipad-video-us-20100127_r848-9cie.mov';
 
playFullscreenVideo( contentURL );

Workaround

Remove "mediaControlStyle" property of Ti.Media.VideoPlayer object.

Comments

  1. jithinpv 2013-05-06

    cannot reproduce Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 iOS iPhone Simulator: iOS SDK version: 6.0
  2. Anshu Mittal 2013-05-09

    Tested with: SDK:3.1.1.v20130508233955 Appcelerator Studio: 3.1.1.201305072102 OS: OSX 10.7.5 Device:ipad simulator Cannot reproduce

JSON Source