Skip to content

A customizable video player with controls and fullscreen mode

Notifications You must be signed in to change notification settings

TitouanVanBelle/VideoPlayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VideoPlayer

A customizable video player with controls and fullscreen mode



How to use

Load a player item

let controller = VideoPlayerController()
controller.videoGravity = .resizeAspectFill

let url = Bundle.main.url(forResource: "Skate", withExtension: "mp4")!
let item = AVPlayerItem(url: url)

controller.load(item: item, autoPlay: true)

Control the capabilities

let capabilities: VideoPlayerController.Capabilities = [.seek, .fullscreen, .playPause]

let controller = VideoPlayerController(capabilities: capabilities)

Change the theme

var theme = VideoPlayerController.Theme()
theme.backgroundStyle = .plain(.white)
theme.controlsTintColor = .white

let controller = VideoPlayerController(theme: theme)

To do

  • Seeking (dragging)
  • Seeking (+/- 15s double tap)

About

A customizable video player with controls and fullscreen mode

Resources

Stars

Watchers

Forks

Languages