Video Tag Src Not Picking Ftp Url as a Source

video tag src not picking ftp url as a source?

something like this

<video width="320" height="240" controls="controls">
<source src="http://movie.mp4" type="video/mp4" />
<source src="http://movie.ogg" type="video/ogg" />
Your browser does not support the video tag.
</video>

How to Embed Video using HTML5 with local file

HTML5 works just by having the video tags.
Make sure to include the video source directly in the video tag like:

<video id="example_video_1" class="video-js vjs-default-skin" width="640" height="264" src="file:///C:/Users/rpimentel/Desktop/converts/demo1.mp4" type='video/mp4' />
</video>

Concerning the video src-path. The video must be somewhere inside your application directory in order to play. So when your application is called video_homepage then put a folder in it with videos. In this example case the source is:

<video src= video_homepage/videos/demo1.mp4></video>

That already should make the video run in Safari and IE (for mp4). For Firefox and Chrome you must convert the video first to .webm (free webm video converter is a free and good converter)

video id and class etc. is only needed when you use an external .js video player (plug in). for playing videos in HTML5 you only need the video tags and src. thats it.

Video 'Stuck' when using Media Source Extension API

Don't get the code from the HTML page, download the whole project from Github: https://github.com/dazedsheep/DASH-JS.

Make sure you place it where you can call it under localhost/dash.

You have to make sure you have the media files inside the directory "bunny_2s_700kbit" which you have to download from here:
http://www-itec.uni-klu.ac.at/ftp/datasets/mmsys12/BigBuckBunny/bunny_2s_480p_only/bunny_2s_700kbit/

Then make sure you have the correct paths in bigbuckbunny_mp.mpd:

<BaseURL>http://localhost/dash/</BaseURL>

and

<Initialization sourceURL="bunny_2s_700kbit/bunny_480_700kbit_dash.mp4"/>

and the correct path in dashtest.html:

var dashPlayer = new DASHPlayer(video,"bigbuckbunny_mp.mpd");

How to embed YouTube videos in PHP?

You have to ask users to store the 11 character code from the youtube video.

For e.g. http://www.youtube.com/watch?v=Ahg6qcgoay4

The eleven character code is : Ahg6qcgoay4

You then take this code and place it in your database. Then wherever you want to place the youtube video in your page, load the character from the database and put the following code:-

e.g. for Ahg6qcgoay4 it will be :

<object width="425" height="350" data="http://www.youtube.com/v/Ahg6qcgoay4" type="application/x-shockwave-flash"><param name="src" value="http://www.youtube.com/v/Ahg6qcgoay4" /></object>

Access a file which is located before / outside the server root directory?

You cannot directly access any file outside your web directory. As your question includes the tag PHP as well, I assume you may want to use it.

What you can do is the following:

Inside your www directory, create a "image.php" file, with a similar content to:

<?php
header('Content-Type: image/png');
readfile("../img/" . $_GET['img']);
?>

And call your images with

<img src="image.php?img=myimage.png" />

Please be aware that your PHP file shouldn't be that simple :) As you may want to address multiple image formats (and providing the correct header for them), checking for malicious file path/inclusions (you don't want to use $_GET without validating/sanitizing the input), extra caching etc. etc. etc.

But this should give you an idea on how you can target your issue.

Could not find a declaration file for module 'module-name'. '/path/to/module-name.js' implicitly has an 'any' type

For the situation where you are installing your own npm package

If you're using a third party package, see my answer below.

Remove .js from "main": "dist/index.js" in package.json.

"main": "dist/index",

Also add typings in package.json per the TypeScript docs:

"main": "dist/index",
"typings": "dist/index",

The folder dist is where the TS compiler stores your module's files.

Stream .mp4 file from CentOS server via php

php stream ?! it's not correct. You don't neet use php to send your video stream. And you can play videos hosting on different server without problems.

You must use dedicated server + nginx (not apache because apache isn't very good to send file/video stream)

My advice is:

  • Centos 7 on dedicated server

  • Nginx

  • Set on your player direct link of your video.

    example:

       <video width="1028" height="720" controls><source src="http://fileServerDomain.com/path/video/myvideo.mp4" type="video/mp4">  </video> 

Firefox addon SDK and DOM manipulation problems

Errors in your lib code and contentScripts are usually logged to the Error Console. Check what is printed there. Also see the SDK console module.

Your page-mod won't run because by default page-mods will run only after the load event.
See the contentScriptWhen documentation.

script tags actually often have a text-node child containing the inline script source. So it is absolutely normal that those are enumerated as well.

For some discussion about walking tree nodes, see: getElementsByTagName() equivalent for textNodes
However, if you're after the text of specific ids/classes, consider using document.querySelector/.querySelectorAll, or if you're after nodes that have a specific XPath, use document.evaluate. This very likely will be a lot faster.

Other than that, I cannot really tell what exactly your remaining issues are and what you're trying to achieve in the first place exactly, so I cannot advice on that.



Related Topics



Leave a reply



Submit