Media object doesn't respond to cookie containing objectMedia object doesn't accept to cookie containing objectWhy Signaling Server needed for WebRTC?WebRTC, ice candidates connectionDetecting an undefined object propertyWhat is the most efficient way to deep clone an object in JavaScript?How do I remove a property from a JavaScript object?How do I check if an array includes an object in JavaScript?How do I correctly clone a JavaScript object?Checking if a key exists in a JavaScript object?How do I set/unset a cookie with jQuery?How to check whether a string contains a substring in JavaScript?How to check if an object is an array?Iterate through object properties

Why does the Rust compiler not optimize code assuming that two mutable references cannot alias?

Why did I lose on time with 3 pawns vs Knight. Shouldn't it be a draw?

Why does Canada require bilingualism in a lot of federal government posts?

Why would a personal invisible shield be necessary?

Composing fill in the blanks

Is there a word to describe someone who is, or the state of being, content with hanging around others without interacting with them?

Does dual boot harm a laptop battery or reduce its life?

How does ssh-copy-id get the public key when only the private key is loaded?

Did Vladimir Lenin have a cat?

How to efficiently shred a lot of cabbage?

Why does aggregate initialization not work anymore since C++20 if a constructor is explicitly defaulted or deleted?

To find islands of 1 and 0 in matrix

Polish citizen flying from Canada to Honolulu with a layover in Chicago

Why is softmax function used to calculate probabilities although we can divide each value by the sum of the vector?

Why tantalum for the Hayabusa bullets?

Is it unprofessional to mention your cover letter and resume are best viewed in Chrome?

Is there an antonym(a complementary antonym) for "spicy" or "hot" regarding food (I DO NOT mean "seasoned" but "hot")?

What is more environmentally friendly? An A320 or a car?

Just how much information should you share with a former client?

Newton's cradles

Why were contact sensors put on three of the Lunar Module's four legs? Did they ever bend and stick out sideways?

What is a good example for artistic ND filter applications?

How to store my pliers and wire cutters on my desk?

Blank spaces in a font



Media object doesn't respond to cookie containing object


Media object doesn't accept to cookie containing objectWhy Signaling Server needed for WebRTC?WebRTC, ice candidates connectionDetecting an undefined object propertyWhat is the most efficient way to deep clone an object in JavaScript?How do I remove a property from a JavaScript object?How do I check if an array includes an object in JavaScript?How do I correctly clone a JavaScript object?Checking if a key exists in a JavaScript object?How do I set/unset a cookie with jQuery?How to check whether a string contains a substring in JavaScript?How to check if an object is an array?Iterate through object properties






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















Sorry if the question is very stupid
I am trying to show the stream from a person to another user using js



I have tried putting it in a cookie but it doesnt work even then.Even when the object in video is the same as the other



File 1



var video = document.querySelector("#videoElement");
var x=document.cookie
console.log(x)
video.srcObject = x;


File 2



var video = document.querySelector("#videoElement");

if (navigator.mediaDevices.getUserMedia)
navigator.mediaDevices.getUserMedia( video: true )
.then(function (stream)
video.srcObject = stream;
document.cookie=video.srcObject
console.log(stream,video.srcObject)
)
.catch(function (err0r)
console.log("Something went wrong!");
);
console.log(stream,video.srcObject)



I would like to just for now show it on two pages but for future what language should i use to store the video if you know you can share it










share|improve this question
































    1















    Sorry if the question is very stupid
    I am trying to show the stream from a person to another user using js



    I have tried putting it in a cookie but it doesnt work even then.Even when the object in video is the same as the other



    File 1



    var video = document.querySelector("#videoElement");
    var x=document.cookie
    console.log(x)
    video.srcObject = x;


    File 2



    var video = document.querySelector("#videoElement");

    if (navigator.mediaDevices.getUserMedia)
    navigator.mediaDevices.getUserMedia( video: true )
    .then(function (stream)
    video.srcObject = stream;
    document.cookie=video.srcObject
    console.log(stream,video.srcObject)
    )
    .catch(function (err0r)
    console.log("Something went wrong!");
    );
    console.log(stream,video.srcObject)



    I would like to just for now show it on two pages but for future what language should i use to store the video if you know you can share it










    share|improve this question




























      1












      1








      1








      Sorry if the question is very stupid
      I am trying to show the stream from a person to another user using js



      I have tried putting it in a cookie but it doesnt work even then.Even when the object in video is the same as the other



      File 1



      var video = document.querySelector("#videoElement");
      var x=document.cookie
      console.log(x)
      video.srcObject = x;


      File 2



      var video = document.querySelector("#videoElement");

      if (navigator.mediaDevices.getUserMedia)
      navigator.mediaDevices.getUserMedia( video: true )
      .then(function (stream)
      video.srcObject = stream;
      document.cookie=video.srcObject
      console.log(stream,video.srcObject)
      )
      .catch(function (err0r)
      console.log("Something went wrong!");
      );
      console.log(stream,video.srcObject)



      I would like to just for now show it on two pages but for future what language should i use to store the video if you know you can share it










      share|improve this question
















      Sorry if the question is very stupid
      I am trying to show the stream from a person to another user using js



      I have tried putting it in a cookie but it doesnt work even then.Even when the object in video is the same as the other



      File 1



      var video = document.querySelector("#videoElement");
      var x=document.cookie
      console.log(x)
      video.srcObject = x;


      File 2



      var video = document.querySelector("#videoElement");

      if (navigator.mediaDevices.getUserMedia)
      navigator.mediaDevices.getUserMedia( video: true )
      .then(function (stream)
      video.srcObject = stream;
      document.cookie=video.srcObject
      console.log(stream,video.srcObject)
      )
      .catch(function (err0r)
      console.log("Something went wrong!");
      );
      console.log(stream,video.srcObject)



      I would like to just for now show it on two pages but for future what language should i use to store the video if you know you can share it







      javascript object video cookies media






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 26 at 21:04









      Zobia Kanwal

      9451 gold badge4 silver badges25 bronze badges




      9451 gold badge4 silver badges25 bronze badges










      asked Mar 26 at 20:28









      HimoHimo

      156 bronze badges




      156 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          0














          A cookie is not a centralized universal camera access repository on the web. Thank goodness.



          A MediaStream is a local resource object representing active camera use, not a shareable URL.



          This object lives solely in your local JS page, and isn't addressable on the web.



          Since it doesn't live on any server, transporting the graphical bits from your camera to a friend's system, requires quite a bit of heavy lifting. This includes establishing an RTCPeerConnection which is the domain of WebRTC:



          navigator.mediaDevices.getUserMedia( video: true )
          .then(function (stream) {
          const iceServers = [urls: "stun:stun.l.google.com:19302"];
          const pc = new RTCPeerConnection(iceServers);

          for (const track of stream.getTracks())
          pc.addTrack(track, stream);

          /* lots of other WebRTC negotiation code */


          You'll also typically need a server of some kind, both to solve discovery, i.e. point of contact, as well as a web socket server to exchange critcal offer/answer session descriptions that are necessary for connection establishment, between the two peers.



          Perhaps the simplest proof of concept is this cut'n'paste demo, which let you and a friend exchange the required WebRTC offer/answer session descriptions manually, letting you establish a connection without any server, to see and talk to each other.



          That has about a 70% chance of working. If you're both behind symmetric NATs (most mobile networks), then it gets harder still (you'll need a TURN server, which costs money).






          share|improve this answer


























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55365717%2fmedia-object-doesnt-respond-to-cookie-containing-object%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            A cookie is not a centralized universal camera access repository on the web. Thank goodness.



            A MediaStream is a local resource object representing active camera use, not a shareable URL.



            This object lives solely in your local JS page, and isn't addressable on the web.



            Since it doesn't live on any server, transporting the graphical bits from your camera to a friend's system, requires quite a bit of heavy lifting. This includes establishing an RTCPeerConnection which is the domain of WebRTC:



            navigator.mediaDevices.getUserMedia( video: true )
            .then(function (stream) {
            const iceServers = [urls: "stun:stun.l.google.com:19302"];
            const pc = new RTCPeerConnection(iceServers);

            for (const track of stream.getTracks())
            pc.addTrack(track, stream);

            /* lots of other WebRTC negotiation code */


            You'll also typically need a server of some kind, both to solve discovery, i.e. point of contact, as well as a web socket server to exchange critcal offer/answer session descriptions that are necessary for connection establishment, between the two peers.



            Perhaps the simplest proof of concept is this cut'n'paste demo, which let you and a friend exchange the required WebRTC offer/answer session descriptions manually, letting you establish a connection without any server, to see and talk to each other.



            That has about a 70% chance of working. If you're both behind symmetric NATs (most mobile networks), then it gets harder still (you'll need a TURN server, which costs money).






            share|improve this answer































              0














              A cookie is not a centralized universal camera access repository on the web. Thank goodness.



              A MediaStream is a local resource object representing active camera use, not a shareable URL.



              This object lives solely in your local JS page, and isn't addressable on the web.



              Since it doesn't live on any server, transporting the graphical bits from your camera to a friend's system, requires quite a bit of heavy lifting. This includes establishing an RTCPeerConnection which is the domain of WebRTC:



              navigator.mediaDevices.getUserMedia( video: true )
              .then(function (stream) {
              const iceServers = [urls: "stun:stun.l.google.com:19302"];
              const pc = new RTCPeerConnection(iceServers);

              for (const track of stream.getTracks())
              pc.addTrack(track, stream);

              /* lots of other WebRTC negotiation code */


              You'll also typically need a server of some kind, both to solve discovery, i.e. point of contact, as well as a web socket server to exchange critcal offer/answer session descriptions that are necessary for connection establishment, between the two peers.



              Perhaps the simplest proof of concept is this cut'n'paste demo, which let you and a friend exchange the required WebRTC offer/answer session descriptions manually, letting you establish a connection without any server, to see and talk to each other.



              That has about a 70% chance of working. If you're both behind symmetric NATs (most mobile networks), then it gets harder still (you'll need a TURN server, which costs money).






              share|improve this answer





























                0












                0








                0







                A cookie is not a centralized universal camera access repository on the web. Thank goodness.



                A MediaStream is a local resource object representing active camera use, not a shareable URL.



                This object lives solely in your local JS page, and isn't addressable on the web.



                Since it doesn't live on any server, transporting the graphical bits from your camera to a friend's system, requires quite a bit of heavy lifting. This includes establishing an RTCPeerConnection which is the domain of WebRTC:



                navigator.mediaDevices.getUserMedia( video: true )
                .then(function (stream) {
                const iceServers = [urls: "stun:stun.l.google.com:19302"];
                const pc = new RTCPeerConnection(iceServers);

                for (const track of stream.getTracks())
                pc.addTrack(track, stream);

                /* lots of other WebRTC negotiation code */


                You'll also typically need a server of some kind, both to solve discovery, i.e. point of contact, as well as a web socket server to exchange critcal offer/answer session descriptions that are necessary for connection establishment, between the two peers.



                Perhaps the simplest proof of concept is this cut'n'paste demo, which let you and a friend exchange the required WebRTC offer/answer session descriptions manually, letting you establish a connection without any server, to see and talk to each other.



                That has about a 70% chance of working. If you're both behind symmetric NATs (most mobile networks), then it gets harder still (you'll need a TURN server, which costs money).






                share|improve this answer















                A cookie is not a centralized universal camera access repository on the web. Thank goodness.



                A MediaStream is a local resource object representing active camera use, not a shareable URL.



                This object lives solely in your local JS page, and isn't addressable on the web.



                Since it doesn't live on any server, transporting the graphical bits from your camera to a friend's system, requires quite a bit of heavy lifting. This includes establishing an RTCPeerConnection which is the domain of WebRTC:



                navigator.mediaDevices.getUserMedia( video: true )
                .then(function (stream) {
                const iceServers = [urls: "stun:stun.l.google.com:19302"];
                const pc = new RTCPeerConnection(iceServers);

                for (const track of stream.getTracks())
                pc.addTrack(track, stream);

                /* lots of other WebRTC negotiation code */


                You'll also typically need a server of some kind, both to solve discovery, i.e. point of contact, as well as a web socket server to exchange critcal offer/answer session descriptions that are necessary for connection establishment, between the two peers.



                Perhaps the simplest proof of concept is this cut'n'paste demo, which let you and a friend exchange the required WebRTC offer/answer session descriptions manually, letting you establish a connection without any server, to see and talk to each other.



                That has about a 70% chance of working. If you're both behind symmetric NATs (most mobile networks), then it gets harder still (you'll need a TURN server, which costs money).







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Apr 11 at 21:03

























                answered Apr 11 at 20:54









                jibjib

                23.7k6 gold badges48 silver badges98 bronze badges




                23.7k6 gold badges48 silver badges98 bronze badges





















                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







                    Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55365717%2fmedia-object-doesnt-respond-to-cookie-containing-object%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript