video js giving error CODE:150 undefined - javascript

I am using video js plugin to play youtube videos. It is giving me following error
VIDEOJS: ERROR: (CODE:150 undefined)
I am using following code
<script src="resources/js/video.js"></script>
<script src="resources/js/youtube.js"></script>
<video id="vid2" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" width="640" height="360" data-setup='{ "techOrder": ["youtube"], "src": "https://www.youtube.com/watch?v=ED0EBHn8_uw" }'>
</video>
Currently I am running this video on new purchased hosting account of reck space Whereas the same code is working on my previous server of godaddy.
One more thing if I change youtube video url to
http://www.youtube.com/watch?v=xjS6SftYQaQ
then it is working on current server as well while any other video is not working. :(
I have tried https and http both.
Please help me.
Thanks

I don't know if you found a solution for this issue but I solved it by setting the "Allow embedding" as checked in the advanced video settings on youtube.

Related

how to use javascript to play google drive video?

I saw a question like mine on this page: How to play video from google drive using javascript?
However, I have a question. For some reason, this answer from that question:
Google provides some GET-params like export and id with google-drive:
?export=download&id=YOUR_LONG_VIDEO_ID
to give you the ability to insert an uploaded video into a HTML5-video-tag.
This should work:
$("#play").click(function() {
$("#video")[0].play();
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button id="play" style="margin-top: 300px;">Play</button>
<video id="video" width="320" height="240" controls>
<source src="https://drive.google.com/uc?export=download&id=0B8-qLYDzDfCyRF9vOE9sWmx5YjA" type='video/mp4'>
Your browser does not support the video tag.
</video>
Works well when I test it out on the w3schools tryit:
https://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_eff_show_hide
I switched that code for my code, I just use it as my practice area.
But when I place my own video in with the same formula, just switching the original google drive video with my own, my video controls are greyed out and clearly can not play the video. My original video is uploaded on my google photos, put in a named folder on my google drive, where both folder and video are open to anyone with the link access.
I don't understand why the original video works fine, and mine doesn't. It's frustrating because I know using this way of putting a google drive video into the video tag allows me to use my custom controls to control the video. But something is going on with my video for some reason.
Here is my code with the original one, you'll see it's the same.
$("#play").click(function() {
$("#video")[0].play();
});
$("#play2").click(function() {
$("#video2")[0].play();
});
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
<button id="play" style="margin-top: 300px;">Play</button>
<video id="video" width="320" height="240" controls>
<source src="https://drive.google.com/uc?export=download&id=0B8-qLYDzDfCyRF9vOE9sWmx5YjA" type='video/mp4'>
Your browser does not support the video tag.
</video>
<br>
<br>
<button id="play2" style="margin-top: 300px;">Play</button>
<video id="video2" width="320" height="240" controls>
<source src="https://drive.google.com/uc?export=download&id=1hLjl0TDEOnPrgXhFxAVNL5fM_qLtCgB9lA" type='video/mp4'>
Your browser does not support the video tag.
</video>
Lots of help will be GREAT!!!!!!!!
According to me, there is permission problem with your drive video.Because I have tried to hit on your link I am getting error of permission. But previous drive's video((working fine)) easily accessible.
Go to your video in Google Drive.
Right-click and select get shareable links, then change your sharing setting to 'On - Public on the Web'.
Refer Image for sharing setting

HTML5 player wont play video from subdomain on smartphone

What is the problem with video tag and HTML5, i can start videos but seek does not work from subdomain on smartphone, when i try in browser and PS all working fine
This is working fine, and seeking working here, but when i change src for video files to subdomain, video is start but seeking not working
<video id="videoPlayer"
src="1.mp4"
style="width:720px; height:440px;"
controls="controls"
type="video/mp4"
onClick="this.play();">
</video>
EDIT: Its not working from my storage server, where is installed lighttpd... from subdomain where is apache seek working fine
try the following code if it helps:
<video id="video player"
width="720"
height="440" controls>
<source src="1.mp4" type="video/mp4" onClick=this.play()>
</video>
Hope this helps out

Video.js and YouTube

I've been unable to get the YouTube plugin working with videoJS. I have what I believe is the latest versions of video.js and vjs.youtube.js. Here's the code I'm using.
<link href="video-js.css" rel="stylesheet">
<script src="video.js"></script>
<script src="vjs.youtube.js"></script>
<video id="vid1" src="" class="video-js vjs-default-skin"
controls
preload="auto"
width="640"
height="360"
data-setup='{ "techOrder": ["youtube"],
"src": "http://www.youtube.com/watch?v=7woVTuN8k3c" }'>
</video>
Any ideas about what I'm doing wrong?
EDIT:
Here's a link to a jsfiddle example. Actually, Firefox and Safari are both working for me, but Chrome and IE do not. Are these supported?
You need to use a plugin to run YouTube videos in Video.js
See my example
I've posted an example of getting youtube working on another question:
enabling youtube playback with video.js wrapper
Not sure if that helps your issue - but there are a few working examples linked from there that work on chrome for me (linux/osx).

VideoJS: not working on IOS

I used the videojs and it is working fine all browsers(including IE) and on Android . But it is not working on IOS devices (iphone and ipad IOS version 6).
Here is the code which I am using to add the video to the page.
<video id="video1" class="video-js vjs-default-skin" width="276" height="153" controls="" preload="auto" data-setup="{}">
<source src=myvideo.mp4 type="video/m4v" >
</video>
I have spent ages and could not find any solution.
I m using video.js Version 3.2.0 and getting the loading spinner forever.
I tried using version 4 and just black screen comes up.
Any Help please.
First put double quotes around the source src attribute and try that. If that doesn't solve it, it sounds like the problem is with the mp4 itself, most likely because of the way it's been encoded or it has a huge filesize. Try using videojs's default movie (http://vjs.zencdn.net/v/oceans.mp4) and see if that works. If it works, you know the problem lies with the movie file itself.
Your web server should support byte-range requests,check whether web server support 206 response. If you are using nginx,add mp4 module.
I solved most of my mp4 encoding issues using handbrake.
Try to change type="video/m4v" to "video/mp4".
<video class="video-js">
<source src="//vjs.zencdn.net/v/oceans.mp4" type="video/mp4">
<source src="//vjs.zencdn.net/v/oceans.webm" type="video/webm">
</video>
Offical docs.

How to remove the error message from <video> in win8 app? (html/js)

How can I disable the left-bottom error message within the video element in a win8 app?
I think you need to provide a bit more information about what exactly are you trying to do ?
As of now, I think providing the correct video source will help with removing the error message.
<video id="video" width="320" height="240" controls="controls">
<source src="Videos/abc.mp4" type="video/mp4" />
</video>
Where Videos is a folder in the project package and abc.mp4 is the video file inside the Videos folder.
Hope this helps :)

Categories

Resources