Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3718

Youtube player api / Video unavailable watch on YouTube / localhost success but IP connection error

$
0
0

My problem is exactly thisI'm playing a live stream on a website using the youtube player api. If my websiteIf I log in via localhost:8081, it works fine.butWhen I work on an IP like 192-168-xx-xx, which is the IP where my website runs"Video unavailableWatch on YouTube"I get an errorMy Youtube player code is as below

player = new YT.Player('player', {                     height: '100%',                     width: '100%',                     videoId: '-Lrxv1_i3qc',                    playerVars: {'autoplay': 1,'showinfo': 0,'modestbranding': 1,'origin': '192.168.xx.xx:8081',                     },                     events: {'onReady': startVideo,'onStateChange': onPlayerStateChange                     }                 });

How do I solve my problemThanks

//It gives an error whether I use the origin or not.

last status:I noticed that there is no problem in some YouTube videos, I think the problem is in live broadcasts.But the problem continues like thisIf I connect as localhost, every video works without any problems. If I connect via IP, some videos give errors.


Viewing all articles
Browse latest Browse all 3718

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>