<head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"> </script> <script type="text/javascript" src="js/jquery.jplayer.min.js"> </script> <script> $(document).ready(function() { /* */ }); </script> </head> <body> <div id="jpId"></div> </body>
$(document).ready(function() { $("#jpId").jPlayer( { ready: function () { $(this).jPlayer("setMedia", { mp3: "../mp3/elvis.mp3" }); } }); });
$(document).ready(function() { $("#jpId").jPlayer( { ready: function () { $(this).jPlayer("setMedia", { m4a: "mp3/elvis.m4a", oga: "ogg/elvis.ogg" }); }, supplied: "m4a, oga", swfPath: "/jPlayer/js" }); });
$(function() { $("#jpId").jPlayer( { ready: function () { $(this).jPlayer("setMedia", { m4v: "http://www.myDomain.com/myVideo.m4v" }).jPlayer("play"); }, supplied: "m4v", swfPath: "jPlayer/js" }); });
$(function() { // executed when $(document).ready() $("#jpId").jPlayer( { ready: function () { $(this).jPlayer("setMedia", { m4v: "/media/myVideo.m4v", ogv: "/media/myVideo.ogv" }).jPlayer("play"); // }, solution: "flash, html", supplied: "m4v, ogv", swfPath: "/scripts" }); });
$(document).ready(function() { $("#jpId").jPlayer( { ready: function () { $(this).jPlayer("setMedia", { mp3: "elvis.mp3" }); } }); $("#jpId").jPlayer("play"); // });
Source: https://habr.com/ru/post/112776/
All Articles