Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-27057

Android: createVideoPlayer keepScreenOn not working properly

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: Release 8.0.0, Release 8.0.1
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      Description

      When loading a second video player, after releasing a previous one, keepScreenOn is not working unless you set repeatMode to Ti.Media.VIDEO_REPEAT_MODE_ONE. If you set it to NONE or don't set it at all, the screen will lock.

      Reproduce with the code below, set the device auto lock to 15seconds and run the following code. Shortly after the 2nd video starts playing, the screen will auto lock. This used to work fine in previous SDK versions.

      var activeVideo = Ti.Media.createVideoPlayer({
        url:
          "http://mirrors.standaloneinstaller.com/video-sample/Panasonic_HDC_TM_700_P_50i.mp4",
        backgroundColor: "black",
        mediaControlStyle: Ti.Media.VIDEO_CONTROL_HIDDEN,
        scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FILL,
        fullscreen: true,
        autoplay: true,
        keepScreenOn: true
      });
       
      setTimeout(function() {
        //Wait 30seconds, screen will still be on then release and load another video
        console.log("New video");
        activeVideo.hide();
        activeVideo.release();
        activeVideo = null;
        activeVideo = Ti.Media.createVideoPlayer({
          url:
            "https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_10mb.mp4",
          backgroundColor: "black",
          mediaControlStyle: Ti.Media.VIDEO_CONTROL_HIDDEN,
          scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FILL,
          fullscreen: true,
          autoplay: true,
          keepScreenOn: true
        });
      }, 30000);
      
      

        Attachments

          Activity

            People

            • Assignee:
              shossain Shak Hossain
              Reporter:
              jfinnigan Joe Finnigan
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Source Code