How To Play Video On The Site

Table of contents:

How To Play Video On The Site
How To Play Video On The Site

Video: How To Play Video On The Site

Video: How To Play Video On The Site
Video: Embed YouTube Videos on YOUR Website - How to UPLOAD to Youtube & ADD Video To Your Site + WHY 2024, May
Anonim

More and more often, various videos can be seen on the pages of sites. The popularity of video repositories like Youtube and online broadcasting of news events is growing in popularity.

How to play video on the site
How to play video on the site

Instructions

Step 1

Take advantage of popular video sources to embed on your site, such as Youtube, Vimeo, Rutube and others. Register in the service you like, upload your video there and get a code to embed the video on your website page.

Step 2

Use ready-made scripts. There are a huge number of JavaScript and PHP players. For example, FLY Player or FlowPlayer. The advantages of these players are that you can use videos of any size without sacrificing quality in favor of downsizing, and also customize their design to fit your needs.

Step 3

Try different extensions. If your site is based on any popular CMS-system, for example Wordpress or Joomla, install plugins for watching videos on them. The easiest and most convenient plugin to install is AllVideos 4. It is easy to use and has many settings.

Step 4

Paste the following ready-made code from Adobe Flash Player in the desired place on the site.

Requires Flash Player to view.

var s1 = new SWFObject ("https://www.uprav.ru/flv_player/player.swf", "ply", "360", "288", "9", "#FFFFFF");

s1.addParam ("allowfullscreen", "true");

s1.addParam ("allowscriptaccess", "always");

s1.addVariable ("autostart", "true");

s1.addVariable ("file", video url);

s1.write ("container1");

Step 5

First, create a div in which the video will load. If the user does not have the Adobe Flash Player installed, he will be prompted to install it. To set autoplay of the video, change the parameter of the following line: s1.addParam ("allowfullscreen", "true"). In the line s1.addVariable ("file", video url), we indicate the link to your video. And with the line s1.write ("container1") we adjust its position.

Recommended: