MMPlayerView icon indicating copy to clipboard operation
MMPlayerView copied to clipboard

Black screen

Open pankajpatel1305 opened this issue 5 years ago • 5 comments

Sometimes the black screen comes when the screen rotation changes.

pankajpatel1305 avatar Jan 24 '20 20:01 pankajpatel1305

Hello, I also facing this issue.

macchamps avatar Nov 26 '20 14:11 macchamps

lul same issues, my eyes got red when find the problem make black screen.... then when debug view hierarchy found coz of mmplayerview

fukemy avatar Apr 03 '21 09:04 fukemy

ok after trying to debug i saw MMLanscapeWindow suddenly appear in window hierarchy, oh my .... even i did not wanna to shink video... (just add to collectionViewCell). Ok, just disable it

public lazy var mmPlayerLayer: MMPlayerLayer = {
        let l = MMPlayerLayer()
        l.cacheType = .memory(count: 5)
        l.coverFitType = .fitToPlayerView
        l.autoPlay = true
        l.player?.volume = 0
        l.repeatWhenEnd = true
        l.fullScreenWhenLandscape = false -> HERE
        l.videoGravity = AVLayerVideoGravity.resizeAspect
        return l
    }()

fukemy avatar Apr 03 '21 09:04 fukemy

Getting the same issue...@fukemy thanks for your answer, but it does not work for me... If there is any other solution please let me know

octal-pankaj avatar May 14 '21 07:05 octal-pankaj

@octal-pankaj , just capture view hierachy, if you see MMLanscapeWindow. Then search all project with that key "fullScreenWhenLandscape", and tried to find the code to disable it

fukemy avatar May 14 '21 09:05 fukemy