All Projects → piemonte → Player

piemonte / Player

Licence: mit
▶️ video player in Swift, simple way to play and stream media on iOS/tvOS

Programming Languages

swift
15916 projects
objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Player

Pbjvideoplayer
▶️ video player, simple way to play and stream media on iOS/tvOS
Stars: ✭ 620 (-66.47%)
Mutual labels:  stream, player, video-player, media, tvos
Libvlc Go
Go bindings for libVLC and high-level media player interface
Stars: ✭ 188 (-89.83%)
Mutual labels:  player, video-player, media
react-native-vlc-media-player
React native media player for video streaming and playing. Supports RTSP, RTMP and other protocols supported by VLC player
Stars: ✭ 221 (-88.05%)
Mutual labels:  player, video-player, media
Plyr React
A simple, accessible and customisable react media player for Video, Audio, YouTube and Vimeo
Stars: ✭ 89 (-95.19%)
Mutual labels:  player, media
Streama
Self hosted streaming media server. https://docs.streama-project.com/
Stars: ✭ 8,948 (+383.94%)
Mutual labels:  video-player, media
Sjmediacacheserver
A HTTP Media Caching Framework. It can cache FILE or HLS media. 音视频边播边缓存框架, 支持 HLS(m3u8) 和 FILE(mp4, mp3等).
Stars: ✭ 87 (-95.29%)
Mutual labels:  player, media
Kjplayerdemo
视频播放壳子:动态切换内核,支持边下边播边缓存的播放器方案,视频支持格式:mp4、m3u8、wav、avi,音频支持格式:midi、mp3
Stars: ✭ 60 (-96.76%)
Mutual labels:  player, video-player
Hls.js
HLS.js is a JavaScript library that plays HLS in browsers with support for MSE.
Stars: ✭ 10,791 (+483.61%)
Mutual labels:  stream, player
Avideo
Create Your Own Broadcast Network With AVideo Platform Open-Source. OAVP OVP
Stars: ✭ 1,329 (-28.12%)
Mutual labels:  video-player, media
React Video Renderer
Build custom video players effortless
Stars: ✭ 100 (-94.59%)
Mutual labels:  player, video-player
Vime
Customizable, extensible, accessible and framework agnostic media player. Modern alternative to Video.js and Plyr. Supports HTML5, HLS, Dash, YouTube, Vimeo, Dailymotion...
Stars: ✭ 1,928 (+4.27%)
Mutual labels:  player, media
Larkplayer
🚀 A lightweight & flexible web player :)
Stars: ✭ 82 (-95.57%)
Mutual labels:  player, video-player
React Native Jw Media Player
React-Native Android/iOS bridge for JWPlayer SDK (https://www.jwplayer.com/)
Stars: ✭ 76 (-95.89%)
Mutual labels:  player, media
Backoffice Administration
Stars: ✭ 89 (-95.19%)
Mutual labels:  stream, player
Nexplayer unity plugin
Stream videos in HLS & DASH with Widevine DRM using NexPlayer Video Streaming Player SDK for Unity on Android & iOS devices
Stars: ✭ 73 (-96.05%)
Mutual labels:  player, video-player
Freemp
Free Media Player (FreeMp)
Stars: ✭ 97 (-94.75%)
Mutual labels:  player, media
Arplayer
Playback videos using ARKit and AVFoundation.
Stars: ✭ 117 (-93.67%)
Mutual labels:  video-player, avfoundation
Player
FFmpeg and SDL2 video player
Stars: ✭ 119 (-93.56%)
Mutual labels:  player, video-player
Srgmediaplayer Apple
An advanced media player library, simple and reliable
Stars: ✭ 123 (-93.35%)
Mutual labels:  player, media
Pandoraplayer
🅿️ PandoraPlayer is a lightweight music player for iOS, based on AudioKit and completely written in Swift.
Stars: ✭ 1,037 (-43.92%)
Mutual labels:  player, media

Player

Player

Player is a simple iOS video player library written in Swift.

Build Status Pod Version Swift Version GitHub license

Need a different version of Swift?

  • 5.0 - Target your Podfile to the latest release or master
  • 4.2 - Target your Podfile to the swift4.2 branch
  • 4.0 - Target your Podfile to the swift4.0 branch

Features

  • plays local media or streams remote media over HTTP
  • customizable UI and user interaction
  • no size restrictions
  • orientation change support
  • simple API
  • video frame snapshot support

Quick Start

Player is available for installation using the Cocoa dependency manager CocoaPods. Alternatively, you can simply copy the Player.swift file into your Xcode project.

# CocoaPods
pod "Player", "~> 0.13.2"

# Carthage
github "piemonte/Player" ~> 0.13.2

Usage

The sample project provides an example of how to integrate Player, otherwise you can follow these steps.

Allocate and add the Player controller to your view hierarchy.

 self.player = Player()
 self.player.playerDelegate = self
 self.player.playbackDelegate = self
 self.player.view.frame = self.view.bounds

 self.addChild(self.player)
 self.view.addSubview(self.player.view)
 self.player.didMove(toParent: self)

Provide the file path to the resource you would like to play locally or stream. Ensure you're including the file extension.

let videoUrl: URL = // file or http url
self.player.url = videoUrl

play/pause

 self.player.playFromBeginning()

Adjust the fill mode for the video, if needed.

 self.player.fillMode = .resizeAspectFit

Display video playback progress, if needed.

extension ViewController: PlayerPlaybackDelegate {

    public func playerPlaybackWillStartFromBeginning(_ player: Player) {
    }

    public func playerPlaybackDidEnd(_ player: Player) {
    }

    public func playerCurrentTimeDidChange(_ player: Player) {
        let fraction = Double(player.currentTime) / Double(player.maximumDuration)
        self._playbackViewController?.setProgress(progress: CGFloat(fraction), animated: true)
    }

    public func playerPlaybackWillLoop(_ player: Player) {
        self. _playbackViewController?.reset()
    }

}

Documentation

You can find the docs here. Documentation is generated with jazzy and hosted on GitHub-Pages.

Community

Resources

License

Player is available under the MIT license, see the LICENSE file for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].