How to streaming video conferencing using webRTC - javascript

I am creating a simple video conferencing application using webRTC.
Find source code here
When I click on the "Setup New Meeting" button, then video streaming start and show new hyperlink like:
When I click on it a new tab opens with video streaming in this tab and both tabs capture video and in both tabs video conferencing is working.
See the below image:
In this image you'll the the list of cameras attached to a user's computer. I would like to do the following:
When I select any camera from the list it will be load in the
appropriate <Section>
When I click on <Camera 1> it will be load in Local Media Stream of user side and other side it will display in Remote Media stream
When I click on <Camera 2> it will be load in Local Media Stream of user side and other side it will display in Remote Media stream
What is the best way to go about achieving this?

Related

How to open/play a video by click a image button video by using api in javascript/AJAX

I use api in the from of json. In JSON file have many link as well as a video link. I want the video link play in next window.

Is there a way to allow automatic audio playback (alarm website)

I am creating a website that alerts when certain events happen with an audible alert. Since the arrival of chrome 66 it is not possible to play audio without the user making a gesture. For me this is a big problem, I was searching but I did not find any solid solution.
For example Youtube. When entering a link in the browser, the video starts automatically, without any user gesture. How do they do it?
It also occurred to me to ask for permission for the browser to allow automatic audio playback. Something like: "Notification.requestPermission ()". But I couldn't find how
When you navigate to a YouTube video link within YouTube itself, it doesn't actually navigate to a new page. YouTube uses a library called Structured Page Fragments (SPF) to render only relevant parts that need to be changed. Because of this, the browser doesn't consider this as a newly navigated page, and allows YouTube to automatically play videos with audio.
For example, from the Homepage, when you click a video in the Subscription box, this counts as a user interaction. The page then loads the fragments required to watch the video using SPF and - because the user is in the same navigation context as far as the browser is concerned - plays the video automatically with audio.
However, if you load the same video in a new navigation context (such as using a link from an external site, or opening it directly in a new tab) users will still need to interact with the page - in this case by clicking the video - to get audio. Once this is done, because the user has now interacted with the page and other videos are dynamically loaded using SPF, further interaction is not required for other videos to play automatically with audio in that navigation context.
Note that you don't need to specifically use SPF to achieve this effect. You can use libraries such as Angular and Vue to change views with a click event, and these should still count as the user having interacted with the page.

azure blob video not showing video only plays audio

I have uploaded video using C# and saved on azure storage with content type set video/mp4. When I want to play the video on browser the video is not shown only audio is playing.
URL: http://snapshotprojectmedia.blob.core.windows.net/projectmediafiles/2.mp4
You can simply navigate this link in chrome to test.

Am I allowed to hide a YouTube video after a user action?

This question is slightly different from:
https://stackoverflow.com/questions/15034835/can-i-hide-a-embeded-youtube-video-or-is-that-against-the-terms-of-use
When a user visits our website, the YouTube player is visible and in the right size. A user can play the video and see the whole video. Nothing fancy. However we want to put the player in a tabbed interface. Meaning that the user can hide the video by going to another tab. For example:
Video | Info | Share
When the site loads the Video tab is active, but users can click "Info", then the video is hidden while the video keeps playing in the background.
Is this allowed? I would say gray area but I'm not sure. We always show the YouTube logo and link to the YouTube video on youtube.com btw. Also, if a users scrolls down on youtube.com, the user also hides the video and can still hear the audio. Is this perhaps the same area?
This is in their terms of services so i would say it is not allowed
8.separate, isolate, or modify the audio or video components of any YouTube audiovisual content made available through the YouTube API;
9.promote separately the audio or video components of any YouTube audiovisual content made available through the YouTube API;
14.use a video player smaller than the minimum video player size set forth in the YouTube API documentation and specifications.
https://developers.google.com/youtube/terms?hl=it

static sections of html over multiple pages

I have a web site with a media player for audio built in. Currently when I visit another page in my website the media player resets for obvious reasons (because the entire page gets loaded).
Is there any way to keep the current song that is playing in the audio player, playing while the user clicks through to a new page? The audio player is simply inside a div and when the user wants to play a new song the javascript just changes the audio objects src atribute.
You should use an iframe and keep the audio player outside of it, so the user does not navigate the entire page but only in the iframe
Basic example:
<div id="audioplayer"></div>
<iframe src="index.html"></iframe>

Categories

Resources