-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stream Video #3
Comments
@ankushdhawan it should work, yes. I haven't tested in yet in production though. Let me know how it goes for you and if there are any problems we can fix them — the goal of the library is to support audio and video, and AVPlayer should handle both agnostically. |
I have tested it its not work for video can you please check it
…On Thu, 2 Feb 2017 at 10:24 PM, Tyler Sheaffer ***@***.***> wrote:
@ankushdhawan <https://github.com/ankushdhawan> it should work, yes. I
haven't tested in yet in production though. Let me know how it goes for you
and if there are any problems we can fix them — the goal of the library is
to support audio and video, and AVPlayer should handle both agnostically.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHYqiwDb0Ymrp08dvwMVDgKwEHyXPUfVks5rYgpagaJpZM4L0yW5>
.
|
@ankushdhawan please be more specific about your issue. "its not work" doesn't help me investigate. |
@ankushdhawan it's possible we may be using this library for video at @calm in our next version, in which case I'll be robustly testing the functionality before that. in either case, a pull request is welcomed if you're able to fix your issue (almost certainly easier than starting from scratch) |
video is not showing only sound is working. |
OK I have a few questions: (1) what is the video format? If you can paste a code sample and the video asset's URL I'm happy to investigate further. |
let tempPath = NSURL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent((videoModel?.video_url)!)
var remoteAudioPlayer = PersistentStreamPlayer(remoteURL:url, localURL: tempPath!)
remoteAudioPlayer?.delegate = self;
remoteAudioPlayer?.addSubView(videoView)
remoteAudioPlayer?.play()
-(void)addSubView:(UIView *)parent
{
_playerViewController.view.frame = parent.frame;
_playerViewController.videoGravity = AVLayerVideoGravityResizeAspectFill;
[parent addSubview:_playerViewController.view];
}
- (void)prepareToPlay
{
self.pendingRequests = [NSMutableArray array];
AVURLAsset *asset = [AVURLAsset URLAssetWithURL:self.audioRemoteStreamingURL options:nil];
[asset.resourceLoader setDelegate:self queue:dispatch_get_main_queue()];
AVPlayerItem *playerItem = [AVPlayerItem playerItemWithAsset:asset automaticallyLoadedAssetKeys:@[@"duration"]];
self.player = [[AVPlayer alloc] initWithPlayerItem:playerItem];
[self.player.currentItem addObserver:self
forKeyPath:@"status"
options:NSKeyValueObservingOptionNew
context:NULL];
_playerViewController.player = self.player;
} |
@tsheaff I've been looking for a cached video stream solution for AVPlayer. I'll try out your library and see if I can get it working with video. |
@adenisonafifi cheers, much appreciated. As I mentioned, most of the hard work w/r/t streaming to disk and the buffer should be handled, it may be quite easy to get it working (although I'm not positive) |
It doesn't look like the AVURLAsset loads from the local file if it already exists. Is that true? I would want to avoid re-streaming the asset if it has already been saved. |
Yes that's a good point. That would be a nice addition, and shouldn't break anything for anyone. I was initializing Another wrinkle is looping, right now looping is particular to audio with @property (nonatomic, strong) AVAudioPlayer *loopingLocalAudioPlayer; instead of a generic AVPlayer. Not critical for v0 of video support though. |
I tried to integrate the streaming part to my video library and the logic also works for video streaming. |
Awesome @brianhei. I haven't had a chance to integrate PersistentStreamPlayer. Still on my roadmap though. |
please check cstlex#1 for streaming from the local filesystem if available. |
@ankushdhawan can you help me for video playing using this third party? |
can we store stream video using this library
The text was updated successfully, but these errors were encountered: