Closed VinayNadig closed 8 years ago
Okay, finally managed to clone the video feed to a separate video element. For anyone facing the same issue, here are the steps:
var video = $('<video>')[0]
video.mozSrcObject = video.srcObject = $("#existing-video-element")[0].mozSrcObject
$("#video-fullscreen").html(video)
I am still not sure if an empty video tag without src
attribute is the expected behavior on Firefox.
Feel free to close the issue if it's the expected behavior.
Hi @VinayNadig,
I was just about to answer your question, but I see you figured it out yourself!
I am still not sure if an empty video tag without
src
attribute is the expected behavior on Firefox.
Yes, in Firefox they use the srcObject
attribute instead of src
(actually, they prefix it as mozSrcObject
), so this is expected. Eventually, I think Chrome will move to srcObject
(at least that is what's in the specs).
Firefox Version - 47.0
Twilio Conversations Version: 0.13.7
Steps to Replicate:
start-server_server.sh
localhost:8000/quickstart.html
(or whichever port the server is running on) in Firefox.The
video
tag within thediv#local-media
element does not have any attribute associated with it.Expected behavior would be to have a
src
attribute or asource
tag as a child.We are trying to display the video feed on fullscreen(in addition to his preview) when a user clicks on his local media preview. On chrome, we do this by parsing the
src
attribute of thevideo
tag and creating a newvideo
tag and setting thesrc
attribute on it. This fails on Firefox since thevideo
tag does not have asrc
attribute.So, the question is, how do we get the video feed url on Firefox after
previewMedia.attach('#local-media');
?Relevant code: https://github.com/twilio/video-quickstart-javascript/blob/master/quickstart.js#L92