josejuanqm / versaplayer Goto Github PK
View Code? Open in Web Editor NEWVersatile Video Player implementation for iOS, macOS, and tvOS
License: MIT License
Versatile Video Player implementation for iOS, macOS, and tvOS
License: MIT License
Maybe i didn't understand well how to use the controls for the player. I have added some Buttons to the View, connected them to the Controls-Class. If i tap the touchfield on the AppleTV-Remote, the controls appears, but got no focus so you can't select or click a Button.
I add my gesture in viewDidLoad(), but it does not work till tapping to make osd on
let swipeRight = UISwipeGestureRecognizer(target: self, action: #selector(handleGesture))
swipeRight.direction = .right
self.view.addGestureRecognizer(swipeRight)
App is not working in Landscape Mode.
The sample TV app crashes on launch, with an error that seems nib related:
VersaPlayerTest_tvOS[69831:7967219] [Storyboard] Unknown class
_TtC20VersaPlayerTest_tvOS19VersaPlayerControls in Interface Builder
file.
Hello thank you for your great plugin. I do love it
I tired to get progress and duration total of videos but option in list features
Please show me
thank you
I have set to VersaPlayer to my view I am getting this issue.
Hey, VersaPlayerPlaybackDelegate is a strong type delegate thus preventing deinit of a ViewController from being called due to strong reference. Protocol should be class type and delegate should be weak. Can you please fix this issue at the earliest.
Thanks in advance.
The player will stop if we enter the app in the background mode. Although capacities of the app sets using in the bg.
If I put VersaPlayer in scrollview, and if VideoPlayerControls view disappears, the scrolling doesn't work if the drag gesture starts from player's view. It does work if the dragging finger doesn't start from player but some other components of the scrollview.
It does also work, if the controls are visible, as soon as they disappear, the scrolling no more works.
Hi there,
There is small issue while video is Buffering
the sound does not pause it is still keep hearing about it.
Thank you
Xcode version: 11 Beta 2~4
There's a build error in red for the Full Screen Controls set stating: "IB Designables: Failed to render and update auto layout status for VersaPlayerControls (wWX-7i-SUK): Failed to launch designables agent. Check the console for a more detailed description and please file a bug report at feedbackassistant.apple.com."
The Full Screen Controls set were directly copied from the Example project file.
How to mute/unmute player? Is there any control there for it?
I Did not see language control? Is there one in the player?
Do you have any example for adding custom control?. my app throw EXC_BAD_ACCESS when clicked on custom control. Thanks for a great framework!!!
Define some guidelines on creating an issue and providing the information. Example - open an issue for Alamofire.
Originally posted by @hemangshah in https://github.com/_render_node/MDEyOklzc3VlQ29tbWVudDQ0NTcxMjI4OA==/timeline/issue_comment#issuecomment-445712288
hello
i try to launch a simple example
but playerView is null
my activity extend UIViewController ( built programmatically without storyboard )
i have the following error : Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
2019-06-11 10:23:33.022373+0200xxxxx[6256:1699778] Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
Hi everyone, @josejuanqm
why video control not showing just video playing and no play or pause or seek bar ?
this is my code its same as example:
import UIKit
import VersaPlayer
class ViewController: UIViewController {
@IBOutlet weak var playerView: VersaPlayerView!
@IBOutlet weak var controls: VersaPlayerControls!
override func viewDidLoad() {
super.viewDidLoad()
if let url = URL.init(string: "https://www.w3schools.com/html/movie.mp4") {
let item = VersaPlayerItem(url: url)
playerView.set(item: item)
}
playerView.layer.backgroundColor = UIColor.black.cgColor
playerView.use(controls: controls)
}
}
do i miss something ? show i enable or do more to show video controls ?
Hi,
I was playing around with your library by implementing a VersaPlayerView
embedded inside a UITableViewCell. Just wondering if you are able to point me in the right direction on how I can have a background behind the video when I have expanded it so I can block out the view behind it?
Thanks
how to set the video as AspectFill
Do mine sharing the theme for Xcode?
Regarding the framework: nice work! Definitely going to give it a try in my project.
Thanks
First of thanks for the excellent library.
When I try to install it via pod it install with "1.2.0" and VersaPlayerItem
becomes to VPlayerItem
and when I see both files then there's only 1 line of code public var isEncrypted: Bool = false
when I use below code then it crash at player.set(item: item)
line of code with below bad access error.
Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)
override func viewDidLoad() {
super.viewDidLoad()
player.use(controls: controls)
if let url = URL.init(string: "https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8") {
let item = VPlayerItem(url: url)
player.set(item: item)
}
}
do I miss something or is there any issue with version?
I tried to play a local file but it does not work. Does the library support?
let main = Bundle.main.path(forResource: "example", ofType: "mp4")!
let url = URL(fileURLWithPath: main)
playerView.layer.backgroundColor = UIColor.black.cgColor
playerView.use(controls: controls)
let asset = AVURLAsset(url: url)
let item = VersaPlayerItem(asset: asset)
playerView.set(item: item)
Is it possible to set more height for player controls than the player view? I have attached a screenshot where you can see the player view is that black background colored part above pink one and above there is controls setup with more height that extends till pink color starting from player view top. The problem is with the setup is touch isn't repond on that pink part but responds on playerview part
**Desktop **
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Is there any caching mechanism for VersaPlay?
If so would like some tips on how to utilize it as it seems videos are always loaded no matter what.
Thanks!!
Hello! When I try to initialize the player in the vc, the app crashes with this error
Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
on playerView.layer.backgroundColor = UIColor.black.cgColor
I am doing exactly everything as the example code, I literally copied it.Also tried to clone the repo and run the example player, which works, but when I create a view controller in my app, and navigate to it the app still crashes...
Current code im using:
`import UIKit
import VersaPlayer
class ViewController: UIViewController {
@IBOutlet weak var playerView: VersaPlayerView!
@IBOutlet weak var controls: VersaPlayerControls!
@IBAction func trigger(_ sender: UIButton) {
print("test")
}
override func viewDidLoad() {
super.viewDidLoad()
playerView.layer.backgroundColor = UIColor.black.cgColor
playerView.use(controls: controls)
if let url = URL.init(string: "https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8") {
let item = VersaPlayerItem(url: url)
playerView.set(item: item)
}
}
}`
Also tried version 2.2.3 of the player, and with swift 4 and 4.2, still no luck..
Any idea what could it be?
Does this support playing a file from file system?
My file URL: file:///Users/gerald/Library/Developer/CoreSimulator/Devices/28694CEC-DEE0-4E95-9302-F3962DDC63B6/data/Containers/Data/Application/620DDA30-4A41-484D-AED5-9FB334C1E9F2/Library/Caches/MyApp/28.mp4
I've tried ...
if let url = URL.init(string: movieFile.filename) { let asset = AVURLAsset(url: url) let item = VersaPlayerItem(asset: asset) playerView.set(item: item) }
and
let url = URL.init(fileURLWithPath: movieFile.filename) print("FILE URL: \(url)") let item = VersaPlayerItem(url: url) playerView.set(item: item)
Both return PlaybackDidFailed Error - Unknown
Am I doing something wrong?
Could not cast value of type 'CALayer' (0x7fff84dce660) to 'AVPlayerLayer' (0x7fff84af1118).
in VersaPlayerRenderingView.swift
Does it support to play a video from Bundle path?
If yes, then please help me to achieve that.
If the screen is tapped, while the video is buffering the controls dissapear normally. But tapping again the controls do not appear and the video does not load. Almost as if the app has frozen
Hi developer
do you have any plan to add faster speed playback option?
like 1.0x(original speed), 1.2x,1.5x, etc. speed to playback m3u8 videos
Can't not return to normal mode in fullscreen mode. pls check. Thank you
My app is restricted to portrait, but I would like enable rotation to landscape when in full screen mode. I have not been able to find if an override is provided here. Does VersaPlayer address this sort of thing? Great framework btw..
how to set the video as AspectFill
Tested with a provided example by running Target VersaPlayerTest_iOS
Steps to produce the crash:
Step 1. Run project's target VersaPlayerTest_iOS on iOS 10.3.3 ( i used iPhone 6s)
Step 2. Tap on show video
Step 3. Tap on back button from the new view controller where the video is being played
and the app crashes!
Note: the app is working fine on my iOS 12.1 device
Crash Log:
1 <VersaPlayer.VersaPlayerView: 0x107e1b450; frame = (0 0; 375 667); autoresize = RM+BM; layer = <CALayer: 0x170227300>>
2 <VersaPlayer.VersaPlayerControlsCoordinator: 0x107d113b0; frame = (0 0; 375 667); layer = <CALayer: 0x174225aa0>>
3 <VersaPlayer.VersaPlayerGestureRecieverView: 0x107e31820; frame = (0 0; 375 667); gestureRecognizers = <NSArray: 0x170247680>; layer = <CALayer: 0x17022d240>>
4 <VersaPlayer.VersaPlayerControls: 0x107e06230; frame = (0 0; 375 667); autoresize = RM+BM; layer = <CALayer: 0x170226ca0>>
5 VersaPlayer.VersaPlayerControlsBehaviour
6 <VersaPlayer.VersaPlayerRenderingView: 0x107e07d30; frame = (0 0; 375 667); layer = <CALayer: 0x170229260>>
7 <VersaPlayer.VersaPlayerLayer: 0x170241ef0>
8 <VersaPlayer.VersaPlayerItem: 0x17022bde0, asset = <AVURLAsset: 0x17022bcc0, URL = https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8>>
9 <VersaPlayer.VersaPlayer: 0x1702419b0>
2019-04-02 00:38:57.968270+0530 VersaPlayerTest_iOS[16838:11201971] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An instance 0x1702419b0 of class VersaPlayer.VersaPlayer was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x174220180> (
<NSKeyValueObservance 0x170242970: Observer: 0x1702419b0, Key path: status, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x170242850>
)'
*** First throw call stack:
(0x1823defe0 0x180e40538 0x1823def28 0x182e3b160 0x180e5e134 0x1822bab28 0x18238acec 0x1822bada4 0x183d25074 0x188575c9c 0x100031928 0x1812c959c)
libc++abi.dylib: terminating with uncaught exception of type NSException
Hey, can you make methods of VersaPlayerPlaybackDelegate optional as we have to conform to all the methods even if we don't have to use it.
It's just a suggestion, if it is not possible due to some other reasons please let me know.
Thank you in advance.
You can send one using 'AVURLAssetHTTPHeaderFieldsKey' in AVPlayer. Does VersaPlayer support. If yes, how? Please guide with example.
Cheers.
Could not believe cocoapods have to download ~500MB only to be able to install this library. I only use Carthage for all libraries in my project. Is it possible to use carthage in addition to pods?
Hi, I didn't use storyboard for create my video view, i've create view as programmatically. I can create video player with code and i can play video with that library. However i can't create controls with code how to create controls as programmatically?
When you enter fullscreen mode and back to normal mode. then you dismiss or pop the viewController Player keeps playing in the background which leads me to think the playerView is not released from Memory. This happens with the provided TestProject.
I think there is a retain cycle issue with the "nonFullscreenContainer" property, making it weak solved the problem for me.
How to make PiP work in iPhone? I know it's not supported but I think a library like this should implement its own PiP for within the app navigation.
Hello thank you for your plugin. I have a problem. I want to use multiple video players on one screen. If I try to do this, all controls are running at the same time. As a result, the UISliders moves all videos.
What's the best way for embedding a video into a UITableViewCell? I'm trying to build something sorta like Twitter/Instagram.
Thank you.
@josejuanqm I want to start off by clarifying a few things, I was not trying to be disrespectful, nor do I understand where in the above message I was disrespectful. What I was, however, frustrated, not at you, but at my own ignorance/incompetence of not figuring it out. As for you, I have nothing but the highest respect for 1. spending the time to build this great project and providing it for free and 2. spending the time to continue to maintain it answer/fix issues.
As for your update, it works perfectly! thank you!!!!!
you my dear friend, have my highest respect!
wishing you a wonderful holiday season.
Originally posted by @forTheSakeOfLogic in #17 (comment)
Hi everyone, got the sample project to work, but no controls. how do I add controls to the player? do I have to do that programmatically or through storyboard?
can someone show one example of at least one control.
thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.