Playing videos in AVPlayerViewController
We have created a controller class that inherited the AVPlayerViewController and are playing it back with the following code:
self.player=[AVPlayer playerWithURL:url];
[self.player play]
When I start playing, sometimes the screen becomes completely dark and no video is displayed.The audio is playing.
Continuous reproduction or difficulty in reproducing.
iOS version: 10.0.2
Please advise me on a workaround.
ios objective-c
The official document says not to create subclasses of AVPlayerViewController.
https://developer.apple.com/reference/avkit/avplayerviewcontroller
Do not subclass AVPlayerViewController.Overriding this class's methods is unsupported and results in undefined behavior.
Why don't you use this as a reference to implement it?
https://stackoverflow.com/a/31277658/4834226
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
581 PHP ssh2_scp_send fails to send files as intended
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
578 Understanding How to Configure Google API Key
618 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.