Skip to content
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

How to get a MediaStream that video can play based on webrtc #35

Closed
zw12579 opened this issue Mar 6, 2019 · 3 comments
Closed

How to get a MediaStream that video can play based on webrtc #35

zw12579 opened this issue Mar 6, 2019 · 3 comments

Comments

@zw12579
Copy link

zw12579 commented Mar 6, 2019

Hello:
I don't want to create a video DomElement, I want to get the video playable stream directly to achieve the panorama.
Below is my demo and code.
image

image

@ghost
Copy link

ghost commented Mar 7, 2019

You can use the video tag's stream after capturing it with MediaStream, as follows:
on play function(){

var video = document.querySelector(“#player video”);
var capturedStream = video.mozCaptureStream ? video.mozCaptureStream() : video.captureStream();
var panorama = new PANOLENS.VideoPanorama(capturedStream, {autoplay:true});

}
Did this answer help?

@zw12579
Copy link
Author

zw12579 commented Mar 7, 2019

No, you understand what I mean wrong. I want to capture the stream for panoramic rendering before creating the video tag. However, I have implemented the functionality I want by modifying your source code. Thank you very much for your reply!

@ghost
Copy link

ghost commented Mar 7, 2019

Thank you very much! Good luck.

@ghost ghost closed this as completed Mar 7, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant