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

self.mmPlayerLayer.resume() not stream video from url #110

Open
ArjunBhilare opened this issue Oct 27, 2020 · 0 comments
Open

self.mmPlayerLayer.resume() not stream video from url #110

ArjunBhilare opened this issue Oct 27, 2020 · 0 comments

Comments

@ArjunBhilare
Copy link

let myURL = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"

    url = URL(string:myURL)
    
    mmPlayerLayer.playView = videoView
    
    mmPlayerLayer.coverFitType = .fitToPlayerView
    
    mmPlayerLayer.videoGravity = .resizeAspectFill
    
    self.mmPlayerLayer.set(url: url)
    
   
    
    mmPlayerLayer.getStatusBlock { [weak self] (status) in

        switch status {
        case .failed(let err):
            print("Error")
        case .ready:
            
            print("Ready to Play")
            self!.stateVideo = "pause"
            self!.mmPlayerLayer.player?.pause()
            
        case .playing:
            //print("Playing")
            self!.stateVideo = "playing"
            
        case .pause:
            //print("Pause")
            self!.stateVideo = "pause"
            
        case .end:
            //print("End")
            self!.stateVideo = "end"
            self!.mmPlayerLayer.resume()
            
        default: break
            
        }
    
    }

    self.mmPlayerLayer.resume()

This doesn't stream the video. Please help!

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