In my web application, i place the jw player for playing the video file. it is not working in fire fox an google chrome. it is working in IE
dvplayer.InnerHtml = "<object id='player' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' name='player' width='500' height='300' > <param name='movie' value='player.swf' /> <param name='allowfullscreen' value='true' /> <param name='allowscriptaccess' value='always' /> <param name='flashvars' value='file=" + file + "&autostart=true' /> </object>";
I wrote a small test that is working in Chrome and Firefox:
<div id="mediaplayer">JW Player goes here</div>
<script type="text/javascript">
var file = "video.mp4";
document.getElementById('mediaplayer').innerHTML = '<object type="application/x-shockwave-flash" data="player.swf" width="100%" height="100%" bgcolor="#000000" id="mediaplayer" name="mediaplayer" tabindex="0"><param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always"><param name="seamlesstabbing" value="true"><param name="wmode" value="opaque"><param name="flashvars" value="netstreambasepath=file%3A%2F%2F%2Fhome%2Faeby%2Fworkspace%2Fatws%2Ftest.html&id=mediaplayer&file=' + file + '&image=preview.jpg&controlbar.position=over"></object>';
</script>
One mistake is that InnerHtml is not lower case. It should read dvplayer.innerHtml.
Related
This question already has answers here:
html/hta mutiple file in audio player
(2 answers)
Closed 12 months ago.
I have found many pieces of code to this effect but all are using WMP7.ocx. I have an installer that takes 10 to 15 minutes to complete and I would like to have something non-intensive to add a bit of joy to the otherwise arduous and dull process. I tried a video and all was well until the install portion of the app began. The video 1st lagged, then lost sync, then died completely. Here is what I am using currently:
!!UPDATED!!
<OBJECT
ID="myvideo"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" STANDBY="Loading Microsoft Windows Media Player components..." TYPE="application/x-oleobject" >
<PARAM NAME="autostart" VALUE="1">
<PARAM NAME="showcontrols" VALUE="1">
<PARAM NAME="AllowChangeDisplaySize" VALUE="1">
<PARAM NAME="DisplaySize" VALUE="13">
<PARAM NAME="ShowGotoBar" VALUE="1">
<PARAM NAME="Volume" VALUE="-250">
<PARAM NAME="SendKeyboardEvents" VALUE="1">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="1">
<PARAM NAME="EnableFullScreenControls" VALUE="1">
<PARAM NAME="animationatStart" VALUE="1">
<PARAM NAME="transparentatStart" VALUE="1">
<PARAM NAME="mute" value="false">
<PARAM NAME="loop" value="True">
<PARAM NAME="fileName" value="" ID="m3">
</OBJECT>
'Then I figured out this piece that made it easy
sub musicbox()
max=25
min=1
Randomize
d = Int((max-min+1)*Rnd+min)
t = "https://example.com/M2/" & d & ".mp3"
vid.filename=t
vid.play
End Sub
Now I just need to know how to tell the app that when the process has stopped so it can run this subroutine again for another song. The code I keep finding seems not to work in HTAs. One step at a time! :)
If you're okay with defining your playlist within the HTA, you can play any number of videos in a loop like the example below which auto-plays three video files named "Vid1.mp4", "Vid2.mp4", and "Vid3.mp4":
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=9">
<script language="vbscript">
window.resizeTo 800,500
VidNum = 1
VidCount = 3
Sub PlayNextVideo
VidNum = VidNum + 1
If VidNum>VidCount Then VidNum = 1
vid.src = "vid" & VidNum & ".mp4"
vid.play
End Sub
</script>
</head>
<body>
<video id="vid" width="100%" controls autoplay onended="PlayNextVideo()">
<source src="vid1.mp4" type='video/mp4'/>
</video>
</body>
</html>
Good morning,
does anybody know anything about the purpose of the value: <param name="isVid" value="true" /> in the brightcove player-configuration?
on the website they just say that it's a bool-value and has to be set to "true". Nothing about what it's doing.
The parameter isVid is required when you embbed a video inside an HTML file,
<script language="JavaScript" type="text/javascript" src="
http://admin.brightcove.com/js/BrightcoveExperiences.js"></script>
<object id="myPlayer" class="BrightcoveExperience">
<param name="bgcolor" value="#FFFFFF" />
<param name="width" value="486" />
<param name="height" value="412" />
<param name="playerID" value="1234567890" />
<param name="playerKey" value="AQ~~,AAAAstMe5SE~,5vOZ123456789bOfHyhc1i" />
<param name="isVid" value="true" />
<param name="#videoPlayer" value="ref:myVid12345" />
</object>
I think is not well described on the docs...
isVid: Boolean Required to be true for all video players.
http://support.brightcove.com/en/video-cloud/docs/player-configuration-parameters
I am trying to get a Brightcove embedded video player to work in IE8. It is currently working in all other browsers >IE8.
I retrieved this code from this Brightcove example: http://files.brightcove.com/BCL_MediaAPI_example.html
<!DOCTYPE html>
<html>
<head>
<title>Media API Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- Javascript Media API wrapper from opensource.brightcove.com -->
<script type="text/javascript" src="http://files.brightcove.com/bc-mapi.js"></script>
</head>
<body>
<h1>Media API Sample</h1>
<!-- Start of Brightcove Player -->
<script language="JavaScript" type="text/javascript" src="http://admin.brightcove.com/js/BrightcoveExperiences.js"></script>
<object id="myExperience" class="BrightcoveExperience">
<param name="bgcolor" value="#FFFFFF" />
<param name="width" value="480" />
<param name="height" value="270" />
<param name="playerID" value="921267190001" />
<param name="playerKey" value="AQ~~,AAAA1oy1bvE~,ALl2ezBj3WG3MLvDx9F9zkV06cNK00ey" />
<param name="isVid" value="true" />
<param name="isUI" value="true" />
<param name="dynamicStreaming" value="true" />
<!-- params for Universal Player API -->
<param name="includeAPI" value="true" />
<param name="templateReadyHandler" value="BCL.onTemplateReady" />
</object>
<script type="text/javascript">brightcove.createExperiences();</script>
<!-- End of Brightcove Player -->
<fieldset>
<legend>Videos</legend>
<div id="results"></div>
</fieldset><br>
<!-- This is the script to modify for the exercise -->
<script type="text/javascript">
// BCL Media API search maker -- adapted from JS-MAPI on opensource.brightcove.com
// namespace to keep all the "global" vars together
var BCL = {};
// placeholder - params for API call
BCL.params = {};
// Media API read token
BCMAPI.token = "WDGO_XdKqXVJRVGtrNuGLxCYDNoR-SvA5yUqX2eE6KjgefOxRzQilw..";
// set the callback for Media API calls
BCMAPI.callback = "BCL.onSearchResponse";
// set the filter
BCL.params.any = "tag:nature";
BCMAPI.search(BCL.params);
BCL.onSearchResponse = function(jsonData) {
var str = "";
for (var index in jsonData.items) {
str += "<a onclick=\"BCL.playVideo(" + jsonData.items[index].id + ")\" style=\"cursor:pointer\"><img src=\"" + jsonData.items[index].thumbnailURL + "\"/><br/><small>" + jsonData.items[index].name + "</<small></a><hr/>";
}
document.getElementById("results").innerHTML = str;
}
// Player API scripting
// event listener for the player being ready
BCL.onTemplateReady = function (event) {
BCL.player = brightcove.api.getExperience("myExperience");
// get a reference to the video player
BCL.videoPlayer = BCL.player.getModule(brightcove.api.modules.APIModules.VIDEO_PLAYER);
}
// play video function
BCL.playVideo = function(videoID) {
BCL.videoPlayer.loadVideoByID(videoID);
}
</script>
</body>
</html>
Any help would be so appreciated!
Try removing the comment from within the opening and closing . I've seen this prevent IE8 working before. No idea why.
I'd like to show content of outlook inbox folder filtered to particular subject using Outlook View Control. I try different parameters to Filter and Restriction parameters (like "Subject"="Test", Subject:"Test" etc), but it don't work. All items are displayed. I'm testing it on Outlook 2010 32 bit.
Thanks for suggestions
Sample Code:
<html>
<head>
<title>Outlook view filter test</title>
</head>
<body topmargin=0 leftmargin=0 scroll=no>
<OBJECT classid=CLSID:0006F063-0000-0000-C000-000000000046 id=tasks height="30%" width="50%">
<param name="Folder" value="Inbox">
<param name="Namespace" value="MAPI">
<param name="Restriction" value="[subject]:'Test'">
<param name="Filter" value="[subject]:'Test'">
<param name="DeferUpdate" value="0">
</OBJECT>
</body>
</html>
You don't want to use Filter, as the documentation says:
represents the Distributed Authoring and Versioning (DAV) Searching and Locating (DASL) statement used to restrict the display to a specified subset of data. Read/write
Instead just use Restriction. With Restriction = means contains, see documentation: https://msdn.microsoft.com/EN-US/library/office/ff865641.aspx
<html>
<head>
<title>Outlook view filter test</title>
</head>
<body topmargin=0 leftmargin=0 scroll=no>
<OBJECT classid=CLSID:0006F063-0000-0000-C000-000000000046 id=tasks height="30%" width="50%">
<param name="Folder" value="Inbox">
<param name="Namespace" value="MAPI">
<param name="Restriction" value="[Subject]='Test'">
<param name="DeferUpdate" value="0">
</OBJECT>
</body>
</html>
I'd like to have a JPG preview for my simple .wmv player. Any ideas? Here it is...
<div id="embed">
<OBJECT id='mediaPlayer1' width="360" height="240"
classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'
codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
<param name='fileName' value="images/video.wmv">
<param name='animationatStart' value='true'>
<param name='transparentatStart' value='true'>
<param name='autoStart' value="false">
<param name='showControls' value="true">
<param name ="ShowAudioControls"value="true">
<param name="ShowStatusBar" value="true">
<param name='loop' value="false">
<EMBED type='application/x-mplayer2'
pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1'
bgcolor='darkblue' showcontrols="true" showtracker='-1'
showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="360" height="240"
src="images/video.wmv" autostart="false" designtimesp='5311' loop="false">
</EMBED>
</OBJECT>
<br />
</div>
Could you put an image over it and when the image gets clicked, hide it and tell WMP to start playing? Something like this:
<script>
function handleStartClick() {
document.getElementById("playbackPreview").style.display = "none";
//not sure about the next line, mybe you have to remove "controls." or so
document.getElementById("mediaPlayer1").controls.play();
}
</script>
<div id="embed" style="position: relative;">
<OBJECT id='mediaPlayer1' width="360" height="240"[...]</OBJECT>
<img id='playbackPreview' style="z-index: 100; position: absolute; top: 0px; left: 0px" src="previewimage.jpg" onclick="handleStartClick()" />
</div>