- Video playback
- Video capture
- Video recording
- Video compression
1. Video playback 1.1 related two frames: iOS8.0 MediaPlayer iOS9.0 avfoundation 1.2 Play mode IOS 8.0
- Mpmovieplayerviewcontroller with views
- Ignoring the mpmovieplayercontroller of the graph
IOS 9.0
1.3 Mpmovieplayerviewcontroller
Mpmovieplayerviewcontroller steps to implement playback
- Get Resource Path
- Initializing the player
- To play present
|
1.4 MPMoviePlayerController
MPMoviePlayerController steps to implement playback
- Get Resource Path
- Initializing the player
- Add the player view to the view of the current controller and set the frame
- Ready to play, start playing
- Next song
Note: The player needs a strong reference |
MPMoviePlayerController the current controller must set a strong reference to the player to set the player's style ControlStyle
- Mpmoviecontrolstylenone//The button without controller is None
- mpmoviecontrolstyleembedded//embedded, and is the default
- Mpmoviecontrolstylefullscreen//Full screen style
- Mpmoviecontrolstyledefault = mpmoviecontrolstyleembedded//Default Style
|
1.5 Avplayerviewcontroller Two frames: Avfoundation and Avkit
Playback steps
- Get Resource Path
- Initializing the player
- Add the PLAYERVC view to the current controller's view and set frame or present out PLAYERVC
- Start playback
|
|
1.6 Play the next song
Play the next song
- Implementation method: Notification
- The received notification key Mpmovieplayerplaybackdidfinishreasonuserinfokey, the returned data is the reason for the end of Mpmoviefinishreason (nsnumber) playback,
- mpmoviefinishreasonplaybackended Playback End
- Mpmoviefinishreasonplaybackerror Playback Error
- mpmoviefinishreasonuserexited User exit
- Determine if the video is a normal end play, and determine how the reason ends
- Set contentURL
- To play
|
Comparison of 1.7 MPMoviePlayerController and Mpmovieplayerviewcontroller
Common
- Can play the video
- Play the next song with notification implementation
|
Similarities and differences.
- Mpmovieplayerviewcontroller with the view of the playback controller, and is full-screen display, MPMoviePlayerController ignoring the diagram, you need to add to the current controller view and set the frame
- MPMoviePlayerController usage Scenario: Circle of Friends
- The controller must have a strong reference to the MPMoviePlayerController when it is used
- Cause: MPMoviePlayerController disappears after Alloc init after the Viewdidload method, so the controller must have a strong reference to it
- MPMoviePlayerController can be set ControlStyle
- Playback in different ways:
- Mpmovieplayerviewcontroller needs present.
- MPMoviePlayerController Call Play Play
|
2. Video interception related frame: Avfoundationavassetimage
- Get Resource Path
- Packaging Avasset
- Create a avassetimagegenerator for the collector
- Intercept
|
Struct is the difference between uiimage and cgimageref that cannot be placed in an array? |
3. Video recording update in 4. Video Compression update
Multimedia technology-Improve your app's grid! A