Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use SRVideoPlayer in collectionView's cell #8

Open
Travloper opened this issue Feb 9, 2019 · 0 comments
Open

Use SRVideoPlayer in collectionView's cell #8

Travloper opened this issue Feb 9, 2019 · 0 comments

Comments

@Travloper
Copy link

It gives me following error -

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'NSLayoutConstraint for <SRVideoPlayerLayerView: 0x7fa64dc59640; frame = (0 0; 0 0); layer = <AVPlayerLayer: 0x600001fe7280>>: A multiplier of 0 or a nil second item together with a location for the first attribute creates an illegal constraint of a location equal to a constant. Location attributes must be specified in pairs.'

What i Did -

  • Took a view in xib of cell and made an outlet
  • In cell for row at index path method -
    SRVideoPlayer *videoPlayer = [SRVideoPlayer playerWithVideoURL:[NSURL URLWithString:dict[@"video"]] playerView:cell.vVideoPlayer playerSuperView:cell.contentView.superview];
    videoPlayer.videoName = @"Here Is The Video Name";
    videoPlayer.playerEndAction = SRVideoPlayerEndActionLoop;
    [videoPlayer play];

HOW CAN I USE IT??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant