Commit cab09589 by 李威

视频问题

parent 50896b4e
...@@ -320,7 +320,9 @@ ...@@ -320,7 +320,9 @@
weakSelf.videoListModel = [DXHFXVideoModel mj_objectWithKeyValues:responseObject[@"data"]]; weakSelf.videoListModel = [DXHFXVideoModel mj_objectWithKeyValues:responseObject[@"data"]];
NSLog(@"%@",weakSelf.videoListModel); NSLog(@"%@",weakSelf.videoListModel);
weakSelf.myView.videoModel = weakSelf.videoListModel; weakSelf.myView.videoModel = weakSelf.videoListModel;
if (weakSelf.currentState == 1) {
[weakSelf.myView controlWithItem:weakSelf.myView.hlBtn];
}
} fail:^(id failMessage) { } fail:^(id failMessage) {
......
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
@property (nonatomic,strong) UILabel *nlNumLabel; @property (nonatomic,strong) UILabel *nlNumLabel;
@property (nonatomic,strong) UIButton *volumeBtn;
@end @end
@implementation DXHotElecticView @implementation DXHotElecticView
...@@ -147,6 +149,20 @@ ...@@ -147,6 +149,20 @@
weakSelf.progressBarView.playTime = currentTime; weakSelf.progressBarView.playTime = currentTime;
}; };
_volumeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[_volumeBtn setImage:[UIImage imageNamed:@"HFX_novolume"] forState:UIControlStateNormal];
[_volumeBtn setImage:[UIImage imageNamed:@"HFX_volume"] forState:UIControlStateSelected];
_volumeBtn.backgroundColor = XHColorRGB_Alpha(0, 0, 0, 0.45);
[_volumeBtn addTarget:self action:@selector(changeVolume:) forControlEvents:UIControlEventTouchUpInside];
_volumeBtn.layer.cornerRadius = 16.f;
_volumeBtn.layer.masksToBounds = YES;
[_controlView addSubview:_volumeBtn];
[_volumeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(self.controlView);
make.right.equalTo(@-10);
make.size.mas_equalTo(CGSizeMake(32, 32));
}];
self.progressBarView = [[DXProgressBarView alloc] init]; self.progressBarView = [[DXProgressBarView alloc] init];
self.progressBarView.delegate = self; self.progressBarView.delegate = self;
...@@ -479,6 +495,20 @@ ...@@ -479,6 +495,20 @@
_wdNumLabel.text = [NSString stringWithFormat:@"%.f%%",value/_wdSlider.maximumValue*100]; _wdNumLabel.text = [NSString stringWithFormat:@"%.f%%",value/_wdSlider.maximumValue*100];
} }
} }
- (void)changeVolume:(UIButton *)sender{
sender.selected = !sender.selected;
self.playerView.currentPlayerManager.muted = !sender.selected;
if(sender.selected){
///不静音
[HJUserDefaults setObject:@"1" forKey:@"videoVolumeIsOn"];
}else{
//静音
[HJUserDefaults setObject:@"2" forKey:@"videoVolumeIsOn"];
}
}
-(void)playVideoTime:(CGFloat)time { -(void)playVideoTime:(CGFloat)time {
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment