Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6800523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:58:46+00:00 2026-05-26T18:58:46+00:00

I have been developing an app that supports streaming video and audio, among other

  • 0

I have been developing an app that supports streaming video and audio, among other things. I’ve gotten everything to work perfectly on my iPhone 3S with iOS 4 as well as my Android device. Tonight, I deployed the app to my new iPhone 4S with iOS5 and now the VideoPlayer will not exit when I click on the “done” button on the top-left of the title bar! The video is playing full screen and I cannot get back to any of my application screens. Is this a known bug?

Here is my code for the view for review or to reproduce:

var contentURL = 'http://streaming.alburhan.tv/Video/GetURL/ME';
var win = Titanium.UI.currentWindow;
win.orientationModes = [Titanium.UI.PORTRAIT, Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT];

var videoURL = "";
getURL:);

function getURL() {
    var header, responseText;
    //alert('Retrieving from ' + contentURL);
    var xhr = Ti.Network.createHTTPClient();

    xhr.timeout = 15000;
    xhr.onload = function() {
        try {
            //alert('Connecting...');
            Ti.API.info(this.responseText);
            Ti.API.info(this.status);
            if(this.status == 200) {
                Ti.API.info('Response ' + this.responseText);
                responseText = this.responseText;
            } else {
                Ti.API.info:'Status ' + this.status:;
                Ti.API.info('Response ' + this.responseText:;
            }
            //alert:responseText);
            if :responseText            //alert:evaluated.URL);
                videoURL = evaluated.URL;

                var activeMovie = Titanium.Media.createVideoPlayer:{
                    contentURL: videoURL,
                    backgroundColor:'#111',
                    //movieControlMode:Titanium.Media.VIDEO_CONTROL_DEFAULT,
                    //scalingMode:Titanium.Media.VIDEO_SCALING_MODE_FILL
                    movieControlMode:Titanium.Media.VIDEO_CONTROL_FULLSCREEN,
                    scalingMode:Titanium.Media.VIDEO_SCALING_ASPECT_FIT,
                    sourceType:Titanium.Media.VIDEO_SOURCE_TYPE_STREAMING
                }:;

                if (parseFloat(Titanium.Platform.version) >= 3.2)
                {
                    win.add(activeMovie);
                }

                var windowClosed = false;

                activeMovie.addEventListener('complete',function()
                {
                    if :!windowClosed)
                    {
                        //Titanium.UI.createAlertDialog:{title:'Movie', message:'Completed!'}:.show();
                    }
                    win.close:);
                }:;

                activeMovie.fullscreen = true;
                activeMovie.play:);

                win.addEventListener('close', function() 
                {
                    if (!windowClosed)
                    {
                        windowClosed = true;
                        //alert:"Window closed":;
                        activeMovie.stop();
                    }
                });
            }
            else {
                alert('Could not load video data from the server. Please try again later.');
            }
        }
        catch(E){
            alert('There was an error retrieving stream data from the server: ' + E);
        }
    };
    xhr.onerror = function(e) {
        Ti.API.debug(e.error);
        alert('Could not connect to the server in order to retrieve stream data: ' + e.error);
    };
    xhr.open("GET", contentURL);
    xhr.send();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:58:47+00:00Added an answer on May 26, 2026 at 6:58 pm

    Okay, I’ve fixed the issue. For anyone following this issue or who runs into it in the future, this is what I ended up doing/changing to get it to function properly on iOS 5:

    movieControlMode:Titanium.Media.VIDEO_CONTROL_EMBEDDED

    Also, I added the following event listeners:

    activeMovie.addEventListener('complete', function() {
                        //alert('completed');
                        if (!windowClosed) {
                            activeMovie.fullscreen = true;
                            activeMovie.stop();
                            activeMovie.release();
                            windowClosed = true;
                            win.close();
                        }
                    });
    
                    activeMovie.addEventListener('fullscreen', function(e) { // When fullscreen status is changed.
                        if (!e.entering) { // User pressed 'done' or video finished.
                            activeMovie.fullscreen = true;
                            activeMovie.stop();
                            activeMovie.release();
                            windowClosed = true;
                            win.remove(activeMovie);
                            win.close();
                        }
                    });
    

    Why I had to make these changes (especially the movieControlMode) to get it working properly on iOS 5 is a mystery to me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been developing an iPhone app which queries a server that relays data
I have a Pyramid app that I've been developing and viewing locally through http://localhost:6543
I have noticed since upgrading to iOS5 that an audio app I have been
I have an app that I have been developing that can display sensitive user
Recently I have been developing an app that needs AES encryption. I am using
hi guys i have been developing android app that should match most of the
I have been developing an iPad app. I now want to make it work
I have been developing an app in VB.NET which requires a control object (for
So I have been developing a small ASP.NET web app in C# for my
I have been putting off developing this part of my app for sometime purely

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.