Show 普通网友 于 2022-03-08 09:43:03 发布 14438 收藏 5版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 vue使用二进制流下载文件,使用
报错:
Federico Freibergerunread, Dec 10, 2018, 6:10:43 AM12/10/18 to EasyRTC Hey, my app is failing due to this error that started to appear today. I'm using the last Chrome version. Its related to the deprecation of the method that Chrome is warning like a couple of months ago?? Thanks! Any help is appreciated since I'm deploying this web application this week!
Andriy Buchynskyyunread, Dec 10, 2018, 7:10:40 AM12/10/18 to EasyRTC Hello, if I would you I would try to avoid createObjectURL. And try something like that:
.srcObject = track; Federico Freibergerunread, Dec 10, 2018, 8:48:13 AM12/10/18 to EasyRTC Yeah, probably something like that would work, but this is the easyrtc.js client that I would need to update. Is there a solution for that already? Or should I go and modify it by myself and wait for a later solution? Federico Freibergerunread, Dec 10, 2018, 9:07:46 AM12/10/18 to EasyRTC Changed:
To
And It works, throws
But loads the media correctly, I think I can work with that until a fix wherever it comes. Federico Freibergerunread, Dec 11, 2018, 11:16:20 AM12/11/18 to EasyRTC Thanks to Devashish Chauhan who answered me on the mail, I'm posting this just for reference. From his answer: The correct way is to - Change
You will have to do this in the easyrtc.js file. wherever you see - element.src = self.createObjectURL(stream); just replace it with element.srcObject = stream; Dimitris Tzimikasunread, Jan 7, 2019, 4:57:42 AM1/7/19 to EasyRTC But if for example device A has android system webview i.e. 59.0... and the device B has 71.0... there is still a problem, at least with my case. The video from device A does not stream to device B. What is URL createObjectURL?createObjectURL() The URL. createObjectURL() static method creates a string containing a URL representing the object given in the parameter. The URL lifetime is tied to the document in the window on which it was created. The new object URL represents the specified File object or Blob object.
Is createObjectURL deprecated?The URL. createObjectURL() method has been removed from the MediaStream interface. This method has been deprecated in 2013 and superseded by assigning streams to HTMLMediaElement.
What is revokeObjectURL?revokeObjectURL() The URL. revokeObjectURL() static method releases an existing object URL which was previously created by calling URL. createObjectURL() . Call this method when you've finished using an object URL to let the browser know not to keep the reference to the file any longer.
|