youtube api - YTPlayerView.m pauseVideo() does not pause the video if controls = 0 - RESOLVED -
update - seems xcode simulator problem, works ok on device (ipad 2 , ipad mini). simulator version 9.0 (simulatorapp-602 coresimulator-159) xcode version 7.0 beta (7a120f)
issue summary:
ytplayerview.m pausevideo() not pause video nor cause state change paused if video loaded controls = 0.
steps reproduce issue:
- load video loadwithvideoid:(nsstring *)videoid playervars:(nsdictionary *)playervars
update - playervars are:
nsdictionary *playervars = @{ @"autohide" : @1, @"autoplay" : @0, @"controls" : @0, @"enablejsapi" : @1, @"playsinline" : @1, @"fs" : @0, @"showinfo" : @0, @"modestbranding" : @1, @"rel" : @1 }; call playvideo()
call pausevideo()
expected output:
the video should start playing, pause. callback on state change should called when video starts playing , again when pauses.
actual results:
the video starts playing not pause. state change callback called when video starts playing, not thereafter.
notes:
immediately after loading video, if native youtube controls used first, api calls work correctly thereafter. so, if load video , tap on uiwebview start playback, , tap on again pause playback, video starts , pauses correctly , state change callback called correctly. after doing playvideo() , pausevideo() methods work expected. if don't first pausevideo() not work.
this may possibly related v0.1.3 working correctly in previous version.
Comments
Post a Comment