Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5340] iOS Titanium.Media.VideoPlayer setUrl not working on SDK 6.x

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionNeeds more info
Resolution Date2017-11-07T16:05:19.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterHenry Orozco
AssigneeShak Hossain
Created2017-11-02T18:55:29.000+0000
Updated2017-11-08T21:08:25.000+0000

Description

Titanium.Media.VideoPlayer setUrl(url) works fine the first time, but the second time after setting another url setUrl(otherUrl), starts playing the first url set, if I execute getUrl() it returns the second url, but it is actually playing the first url set. // index.js var videoPlayer = Titanium.Media.createVideoPlayer({ top : 0, visible: false, autoplay: true, mediaControlStyle : Ti.Media.VIDEO_CONTROL_NONE, scalingMode : Ti.Media.VIDEO_SCALING_ASPECT_FIT }); function playOne(e) { videoPlayer.setUrl('http://nadikun.com/audio/pink-shades-o-pnr.mp3'); videoPlayer.play(); } function playTwo(e) { videoPlayer.stop(); // the issue is here, even though I am setting another URL still plays the previous URL set videoPlayer.setUrl('http://nadikun.com/audio/suit-and-tie-oscar-wylde-remix.mp3'); videoPlayer.play(); } function stop(e) { videoPlayer.stop(); } function getUrl(e) { alert('videoPlayer.getUrl(): ' + videoPlayer.getUrl()); } $.index.open();

Comments

  1. Sharif AbuDarda 2017-11-04

    Hello, Please create a full reproducible test code and provide here for us to test the issue. Also, provide detail affected environment. Thanks.
  2. Hans Knöchel 2017-11-07

    The video-player wasn't touched between 5.x and 6.x, so it has to be something on your end. If not, please try the new video-player being introduced in SDK 7.0 as part of TIMOB-19040
  3. Henry Orozco 2017-11-08

    full reproducible test code added.

JSON Source