piemonte / pbjvideoplayer Goto Github PK
View Code? Open in Web Editor NEW▶️ video player, simple way to play and stream media on iOS/tvOS
License: MIT License
▶️ video player, simple way to play and stream media on iOS/tvOS
License: MIT License
my honest;Will somebody know,how to make an effect like meipai'MV,just like combine fileter && mp4 ,but i have no idea about it.Someone know's where can access such an article?vary thx.
Hello guys I have used the library "pbjvideoplayer" for playing videos from urls. The mp4 video is playing on iOS > 8 and not playing on ios < 8.
video url = http://ivoiceup.com/wework/message_uploads/82208897ae4f9b7d64a50bc70c6cf0a3.mp4
How to check fps rate and also need to set fps rate.
Hello,
I cant seem to find where a delegate is called when the video is ready to play (from a url sourcce).
There is a small delay where i would like to present a loading view and "remove" it when the video starts, but cannot find a delegate for the change in buffering state. Is that intentional ?
and by the way: THANKS for the control 💃
how can i make the porject only get the video thumbnail and just start playing/buffereing when i press the play, ( i dont want the video to buffer in the background unless the user press play)
As far as I can tell it doesn't make sense to be able to configure a video player that both loops and freezesAtEnd, but the current API allows for said configuration. Should probably refactor the playbackLoops
and playbackFreezesAtEnd
properties into a single enum like below, yeah?
typedef NS_ENUM(NSInteger, PBJVideoPlayerPlaybackStyle) {
PBJVideoPlayerPlaybackStylePlaysOnce = 0,
PBJVideoPlayerPlaybackStylePlaysOnceAndFreezesAtEnd,
PBJVideoPlayerPlaybackStyleLoops,
};
Currently if you use remote url with bad connection video stops when buffer is empty and never goes on.
I have workaround of this, if you like, I will submit PR for that.
I have a problem where sometimes (around 50%) I get a black playback view after composing a video and trying to show it with PBJVideoPlayer.
My code is very similar to the example:
_videoPlayerController = [[PBJVideoPlayerController alloc] init];
_videoPlayerController.delegate = self;
_videoPlayerController.view.frame = _playerView.bounds;
[self addChildViewController:_videoPlayerController];
[_playerView addSubview:_videoPlayerController.view];
[_videoPlayerController didMoveToParentViewController:self];
_videoPlayerController.videoPath = [self finalVideoPath];
The video path if not nil for sure, and the bounds are correct.
I guess it is some kind of racing condition problem, this code is executed on a compose video finish event I have, but I am not sure what can be done to refresh the player or something similar.
Any ideas?
Uggh, just lost a day pulling out my hair becasue of this http://openradar.appspot.com/10845730
We have been using PBJVideoPlayer and it is awesome.
We are loading a remote m3u8 video and during the initialization of the AVURLAsset, PBJVideoPlayer loads information about the video asynchronously using loadValuesAsynchronouslyForKeys. The keys that are currently in the list are "tracks", "playable", and "duration". We have one tester who is halfway around the world from our test server that is always having the problem that the "tracks" and "playable" keys succeed with the AVKeyValueStatusLoaded. However, the "duration" key is failing with AVKeyValueStatusFailed.
So, despite searching the Apple documentation and the internet high and low, I am not exactly sure what to do in this situation and have a few questions:
I just can't seem to determine what the behavior will be if I change the code to ignore a failure on "duration" or how to attempt to correct it. Currently the PBJVideoPlayerController returns and never finished initializing the video if any of the key loading fails.
i'm giving myself a headache trying to figure out AVAssetExportSession. could you lend some guidance on how to best save the AVAsset found in PBJVideoView to the user's camera roll?
fyi i'm building an app with "share to instagram" functionality, which is why i need the video in the user's camera roll.
Is there any way to play while the screen is being held down, and pause when let go?
edit:
autoplay = videoPlayerController.playFromBeginning();
loops = videoPlayerController.playbackLoops = true;
I've searched on the AVPlayerStatus provided by the AVFoundation Framework (iOS9.0) and only appear these enums "AVPlayerStatusUnknown", "AVPlayerStatusReadyToPlay" and "AVPlayerStatusFailedoleranceBefore"? There is something that i am missing ?
@misslester I kinda think all the delegate methods should be optional. It's kinda annoying that if you only care about one of them that you still have to implement the 4 required ones. What do you think?
Very nice and useful lib…
But not being able to access the underlying _avplayer severely limits its usefulness, since many properties cannot be read/set through it yet. And since it is declared in a class extension, there is no way to use an extension either…
Would you consider moving _avplayer to an instance variable or providing a getAVPlayer
method?
I can provide PR, but you'll probably be better off doing it your way since it's such a small change…
http://7xldny.com1.z0.glb.clouddn.com/job_video/guide.m3u8
can't play this .
How can do it.
in iOS Safari is OK.
Is it possible to make video fill whole space of ViewController? Now when I add the size to ViewController, video within that view controller has a margins. I want to add something similar to Aspect Fill mode on UIImageView.
add the ability to gracefully fade out audio when stopping
I'm new to iOS so forgive me if this is basic, but _handleTap
is a private function.
Hi! @piemonte
How to support at some duration to read the video?
Such as:
MaxDuration (30:00)
If direct player (15:00) duration of the video. how to do?
Jack
Not work in iOS7. Video don't load or freeze in a few seconds.
Update the sample project to show auto-play while scrolling
Is it possible to detect the orientation of the video and rotate the view accordingly? If a video has a greater width than height, I'd like to rotate the playback to Landscape Left.
hello
I can see maxDuration property in PBJVideoViewController.m file
Is it possible to add time slider bar ?
Thanks
Can we able to rotate player?? With respect to landscape or portrait mode
Actually I want toggle screen on click of full screen button and video screen enters in full screen with landscape orientation and toggle back to portrait orientation.
Can we able to do using this library??
##Can we able to rotate player?? With respect to landscape or portrait mode
Actually I want toggle screen on click of full screen button and video screen enters in full screen with landscape orientation and toggle back to portrait orientation.
Can we able to do using this library?? @natan @rromanchuk @fyaqub @zedrdave @rudywen
I faced a critical issue for video playing with PBJVideoPlayer.
Sometimes, video playing is showing a black screen with only sound. The sound is working good.
This was worked on iOS 9.x well.
I am not sure the reason.
Please review that and help soon.
Looking forward to your fixing or replying
Thanks
Hi, is it posible to use PBJVideoPlayer with NSData ?
If not how can i do that, please ?
Thanks in advance
Hi,
I found not sound on my phone(iPhone 5S). The details: There hasn't sound while play video by xCode 7.1.1 compile and run on iOS 9.1.
could you plz add a caching feature, so it will not buffer from the start
Thx for support. :)
I want to support full screen in my project is it possible?
Hi, I think a video player needs a method to seek to any time. Doesn't it?
Any idea why my videos won't take the full aspect ratio of the screen? I'm using PBJVision to record video and PBJVideoPlayer to play them back.
Here's my relevant code (in swift):
// allocate controller
var videoPlayerController = PBJVideoPlayerController();
videoPlayerController.delegate = self;
videoPlayerController.view.frame = playerView.bounds;
// Disable tap to pause
videoPlayerController.view.userInteractionEnabled = false;
// setup media
videoPlayerController.videoPath = self.videoPath?;
// present
self.addChildViewController(videoPlayerController);
playerView.addSubview(videoPlayerController.view);
videoPlayerController.didMoveToParentViewController(self);
// Start Video
videoPlayerController.playFromBeginning();
Sometimes, it'll even appear as such: http://cl.ly/YYWY (but it's highly likely that it's an issue specific to my app, not a PBJVideoPlayer issue)
I don't want the video to pause and play when the user touches the screen. I want it to happen only when he clicks a particular button. Can you please let me know if this is possible?
Technically the demo app shouldn't be built as part of the main pod. 😉 Not a big deal though. P4 / Later.
I wonder what kind of files do i play except http://
I want to play avi files and http streaming files in own app
so please tell me your good video player what to do!!!
as soon as possible
I'm playing a simple mp4 video and am not receiving any sound from the video. To contrast this, I used your Player lib with the same code and no issues (sound and video worked just fine). I'm bridging this library to my Swift project due to other non-related reasons. Code sample below.
self.player = PBJVideoPlayerController()
if let videoPlayer = self.player {
videoPlayer.view.userInteractionEnabled = true
videoPlayer.view.multipleTouchEnabled = true
videoPlayer.view.frame = self.view.bounds
videoPlayer.playbackFreezesAtEnd = false
videoPlayer.playbackLoops = true
videoPlayer.videoPath = self.ViewControllerVideoPath
self.addChildViewController(videoPlayer)
self.view.addSubview(videoPlayer.view)
videoPlayer.didMoveToParentViewController(self)
videoPlayer.playFromBeginning()
}
Hi,
I'm working on a project that has embedded videos in a UITableView and I'm using the PBJVideoPlayerController for the playback.
But I'm having a problem with clearing the last clip from the player.
the use case goes like this:
you show a video in the top cell and then you scroll the tableview, the scroll pause the playback, after the scroll finishes you load a new video but the player still holds a reference to the old one.
how to i clear the player object?
Hello I am trying to download a video and show it. It doesn't have an extension but as you can see after downloading it, it is indeed a video file. Any idea why? Here's the sample url. http://files.parsetfss.com/575443fd-a4da-414e-9219-cc156a414acc/tfss-f40a8a6f-2ebc-427a-bba0-e421b7e7517d-file
Add video caching for remote videos.
Hello,
I would like to save viewed video to the camera roll, I have an error with the export, did I do something wrong ?
AVAssetExportSession *exportSession = [AVAssetExportSession exportSessionWithAsset:self.videoPlayerController.asset
presetName:AVAssetExportPresetHighestQuality];
NSString *exportPath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"tempOutput.mov"];
exportSession.outputURL = [NSURL fileURLWithPath:exportPath isDirectory:NO];
exportSession.outputFileType = AVFileTypeQuickTimeMovie;
[exportSession exportAsynchronouslyWithCompletionHandler:^{
if (exportSession.error) {
NSLog(@"Export failed: %@", [exportSession error]);
} else {
UISaveVideoAtPathToSavedPhotosAlbum(exportPath, self, @selector(video:didFinishSavingWithError:contextInfo:), NULL);
}
}];
The error:
Export failed: Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSUnderlyingError=0x14d8b9580 {Error Domain=NSOSStatusErrorDomain Code=-12780 "(null)"}, NSLocalizedFailureReason=An unknown error occurred (-12780), NSLocalizedDescription=The operation could not be completed}
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.