cxfeng1 closed pull request #1418: [WEEX-556][iOS] Fix video play state is not 
'play' while set autoplay…
URL: https://github.com/apache/incubator-weex/pull/1418
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ios/sdk/WeexSDK/Sources/Component/WXVideoComponent.m 
b/ios/sdk/WeexSDK/Sources/Component/WXVideoComponent.m
index cf3a5fc681..c6b955e0bf 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXVideoComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXVideoComponent.m
@@ -333,14 +333,6 @@ -(void)viewDidLoad
     _videoView = (WXVideoView *)self.view;
     [_videoView setURL:_videoURL];
     [_videoView setPosterURL:_posterURL];
-    if (_playStatus) {
-        [_videoView play];
-    } else {
-        [_videoView pause];
-    }
-    if (_autoPlay) {
-        [_videoView play];
-    }
     __weak __typeof__(self) weakSelf = self;
     _videoView.posterClickHandle = ^{
         [weakSelf.videoView play];
@@ -367,6 +359,14 @@ -(void)viewDidLoad
         }
         [weakSelf fireEvent:eventType params:nil];
     };
+    if (_playStatus) {
+        [_videoView play];
+    } else {
+        [_videoView pause];
+    }
+    if (_autoPlay) {
+        [_videoView play];
+    }
 }
 
 -(void)updateAttributes:(NSDictionary *)attributes


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to