Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

[WEEX-556][iOS] Fix video play state is not 'play' while set autoplay… #1418

Merged
merged 1 commit into from
Aug 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions ios/sdk/WeexSDK/Sources/Component/WXVideoComponent.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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
Expand Down