VideoExpertsGroup / Chrome.RTSP.Player

Chrome RTSP player
https://www.videoexpertsgroup.com/
144 stars 54 forks source link

Problem occured when protocol is https, chrome.runtime is undefined! #24

Closed marin-marin closed 6 years ago

marin-marin commented 6 years ago

Hi, i run my page with https protocol, but console tells me image i visited code found it may be caused by chrome extension.

self.m.port = chrome.runtime.connect("hncknjnnbahamgpjoafdebabmoamcnni"); // chrome.runtime is undefined

i searched a lot but no solution. is that about chrome extensions or something?

Thanks, Marin

bleikher commented 6 years ago

Hi,

You have to install the chrome app first ( https://chrome.google.com/webstore/detail/vxg-media-player/hncknjnnbahamgpjoafdebabmoamcnni ).

Then, see the sample page https://www.videoexpertsgroup.com/nacl_player_api/

The code: self.m.port = chrome.runtime.connect("hncknjnnbahamgpjoafdebabmoamcnni"); is chrome runtime API and works only in Chrome.

Regards, Alexey Bleikher Solution Architect | VXG www.videoexpertsgroup.com

marin-marin commented 6 years ago

Hi, I've already installed chrome app, and used it just like the sample page. But I have solved this problem by using websocket. Thanks for your answer.

fangxian commented 5 years ago

@MaRunhao 你好,请问下你具体是怎么解决的?我这边也是在https协议下无法播放rtsp流

marin-marin commented 5 years ago

@MaRunhao 你好,请问下你具体是怎么解决的?我这边也是在https协议下无法播放rtsp流

年代有点久远了, 记不太清, 不过我好像是把他在判断https那里的处理改成使用websocket了

fangxian commented 5 years ago

@MaRunhao 恩,按你说的改动后解决了,非常感谢。