Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20248] iOS: Alloy - Video Player with Remote/Local Url call in index.js with Activity Indicator causing video not showing

GitHub Issuen/a
TypeBug
PriorityHigh
StatusReopened
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterShawn Lan
AssigneeUnknown
Created2016-01-07T20:14:53.000+0000
Updated2018-02-28T19:55:57.000+0000

Description

If in the Alloy Markup, the video player adds Activity Indicator as a child, the video plays but no image.
	<VideoPlayer id="videoPlayer" ns="Ti.Media" fullscreen="true">
		<ActivityIndicator id="actInd" style="Ti.UI.ActivityIndicatorStyle.BIG" />
	</VideoPlayer>

Comments

  1. Sharif AbuDarda 2016-01-10

    Hello, I tried to reproduce the issue with both Alloy and Classic project in SDK 5.1.1.GA. I was unable to do so. The video player plays fine with Activity Indicator as a child.

    Code Sample

    Alloy

       <Alloy>
       	<Window class="container">
       		<VideoPlayer id="videoPlayer" url='bigbuckbunny.mp4' fullscreen='true' autoplay='true'>
       			<ActivityIndicator style="Ti.UI.ActivityIndicatorStyle.BIG" message= 'Loading...' color= 'red' />
       		</VideoPlayer>
       	</Window>
       </Alloy>
       

    Classic

       var vidWin = Titanium.UI.createWindow({
           title : 'Video View Demo',
           backgroundColor : '#fff'
       });
       
       var videoPlayer = Titanium.Media.createVideoPlayer({
           autoplay : true,
           fullscreen: true,
           url: 'bigbuckbunny.mp4',
       });
       
       var activityIndicator = Ti.UI.createActivityIndicator({
         color: 'green',
         message: 'Loading...',
         style: Ti.UI.ActivityIndicatorStyle.BIG,
         
       });
       
       videoPlayer.add(activityIndicator);
       vidWin.add(videoPlayer);
       vidWin.open();
       

    Environment

    Mac OS X Appcelerator Command-Line Interface, version 5.1.0 Titanium CLI Version = 5.0.5 SDK Version = 5.1.1.GA iOS 9.1 Thanks.
  2. Shawn Lan 2016-01-12

    Hello, Try set the url in the controller js, not in the view xml. I test it with a remote url, not a local file. Not sure if it matters. The video plays with no images.
  3. Shawn Lan 2016-01-18

    Although I tested with remote URL, it doesn't mean local files won't have this issue. Thanks.
  4. Sharif AbuDarda 2016-01-18

    Hello [~shawnlan], I tested this with local Url defined in index.js. It looks like this is also happening with local url defining in index.js file. So the problem here is with where you are calling the url property for video player. I am re-editing the title.
  5. Chee Kiat Ng 2016-02-10

    [~sdarda] so you are saying that in BOTH ALLOY and CLASSIC, if activity indicator is set, it will fail?
  6. Shawn Lan 2016-09-24

    Tested it again recently with SDK 5.5.0. With or without activity indicator set, as long as I have in Alloy View and set the video URL from the controller, the video plays *without* images.

JSON Source