| Author |
Message |
Steve
Guest
|
Posted:
Sat Jul 30, 2005 12:30 am Post subject:
Media File Editor |
|
|
I am trying to add script commands to a wmv file via the Windows Media File
Editor. I have tried to follow the example & have actually copied the exact
code & have setup a few scripts within the file. I moved the scripts to the
header & created a new file. But for some reason.... the scripts don't run.
In theory this seems relatively easy...but i must be missing something.
Steve.
|
|
| Back to top |
|
 |
Neil Smith [MVP Digital M
Guest
|
Posted:
Sat Jul 30, 2005 12:30 pm Post subject:
Re: Media File Editor |
|
|
On Fri, 29 Jul 2005 14:51:04 -0700, "Steve"
<Steve@discussions.microsoft.com> wrote:
| Quote: | I am trying to add script commands to a wmv file via the Windows Media File
Editor. I have tried to follow the example & have actually copied the exact
code & have setup a few scripts within the file. I moved the scripts to the
header & created a new file. But for some reason.... the scripts don't run.
In theory this seems relatively easy...but i must be missing something.
|
Users can turn off 'enable script commands from web pages' in the
player preferences, to increase security. Is it possible this is what
you're seeing ? How about the script commands - what were they, and
did they work before you moved them to the header ?
Cheers - Neil |
|
| Back to top |
|
 |
Steve
Guest
|
Posted:
Sat Jul 30, 2005 4:30 pm Post subject:
Re: Media File Editor |
|
|
Hello again Neil
So actually I haven't gotten this to work at all. The example works when I
run it from the demo site. I got the demo code... placed it in my app...
took one of my video's & using the Media File Editor added scritps to it. I
tried that....and that didn't work... so then I tried the option of moving
the scripts to the header & that didn't work either. I think my next step on
Monday will be to just setup the demo code & video to see that work on my
server. By the way, i'm streaming with the media server & a web form object.
Thanks in advance for your input... your last link worked great for me.
"Neil Smith [MVP Digital Media]" wrote:
| Quote: | On Fri, 29 Jul 2005 14:51:04 -0700, "Steve"
Steve@discussions.microsoft.com> wrote:
I am trying to add script commands to a wmv file via the Windows Media File
Editor. I have tried to follow the example & have actually copied the exact
code & have setup a few scripts within the file. I moved the scripts to the
header & created a new file. But for some reason.... the scripts don't run.
In theory this seems relatively easy...but i must be missing something.
Users can turn off 'enable script commands from web pages' in the
player preferences, to increase security. Is it possible this is what
you're seeing ? How about the script commands - what were they, and
did they work before you moved them to the header ?
Cheers - Neil
|
|
|
| Back to top |
|
 |
Neil Smith [MVP Digital M
Guest
|
Posted:
Sat Jul 30, 2005 8:30 pm Post subject:
Re: Media File Editor |
|
|
On Sat, 30 Jul 2005 09:09:04 -0700, "Steve"
<Steve@discussions.microsoft.com> wrote:
| Quote: | Hello again Neil
So actually I haven't gotten this to work at all. The example works when I
run it from the demo site. I got the demo code... placed it in my app...
|
I'm confused - which demo code do you mean, and which app are you
talking about ?
| Quote: | took one of my video's & using the Media File Editor added scritps to it. I
tried that....and that didn't work... so then I tried the option of moving
|
I think we need to define what "didn't work" means ? What were your
script commands, what effect did you intend to see ?
| Quote: | the scripts to the header & that didn't work either. I think my next step on
Monday will be to just setup the demo code & video to see that work on my
server. By the way, i'm streaming with the media server & a web form object.
|
So do you think you might have either a cross-zone scripting problem
here (trying to go from an IE security zone with a lower setting like
internet, to a higher setting like local zone or UNC server name) ?
Cheers - Neil
| Quote: | "Neil Smith [MVP Digital Media]" wrote:
On Fri, 29 Jul 2005 14:51:04 -0700, "Steve"
Steve@discussions.microsoft.com> wrote:
I am trying to add script commands to a wmv file via the Windows Media File
Editor. I have tried to follow the example & have actually copied the exact
code & have setup a few scripts within the file. I moved the scripts to the
header & created a new file. But for some reason.... the scripts don't run.
In theory this seems relatively easy...but i must be missing something.
Users can turn off 'enable script commands from web pages' in the
player preferences, to increase security. Is it possible this is what
you're seeing ? How about the script commands - what were they, and
did they work before you moved them to the header ?
Cheers - Neil
|
|
|
| Back to top |
|
 |
Steve
Guest
|
Posted:
Mon Aug 01, 2005 4:30 pm Post subject:
Re: Media File Editor |
|
|
I found the Demo at
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/samples/internet/imedia/netshow/captioning/default.asp
I created some generic code & have tried a few different scripts such as
pause, stop, etc.;
<SCRIPT FOR="wmp" EVENT="ScriptCommand(bstrType, bstrParam)"
LANGUAGE="Jscript">
if (bstrType.toLowerCase() == "showMenu") {
player=document.getElementById('wmp');
player.UiMode="none";
}
</SCRIPT>
Within the editor, I opened the file & added scripts. The 'type' would be
the name, 'showMenu', with a parameter of, '1'. Once i get it working I will
define the differences of 0, 1, 2, etc.
The script does not seem to fire. Even if on purpose I place an error in
the script, the error does not fire.
My objective for the scripts will be the following;
1. Set the UiMode=none on entry of video.
2. Show a menu item during the video.
3. Replace video with an image when completed.
I'm not sure if i mentioned before that I am using the Media Server &
streaming the video.
My IE explorer has not shown any warnings and is set to the default security
setting.
Thanks again Neil!
Steve.
"Neil Smith [MVP Digital Media]" wrote:
| Quote: | On Sat, 30 Jul 2005 09:09:04 -0700, "Steve"
Steve@discussions.microsoft.com> wrote:
Hello again Neil
So actually I haven't gotten this to work at all. The example works when I
run it from the demo site. I got the demo code... placed it in my app...
I'm confused - which demo code do you mean, and which app are you
talking about ?
took one of my video's & using the Media File Editor added scritps to it. I
tried that....and that didn't work... so then I tried the option of moving
I think we need to define what "didn't work" means ? What were your
script commands, what effect did you intend to see ?
the scripts to the header & that didn't work either. I think my next step on
Monday will be to just setup the demo code & video to see that work on my
server. By the way, i'm streaming with the media server & a web form object.
So do you think you might have either a cross-zone scripting problem
here (trying to go from an IE security zone with a lower setting like
internet, to a higher setting like local zone or UNC server name) ?
Cheers - Neil
"Neil Smith [MVP Digital Media]" wrote:
On Fri, 29 Jul 2005 14:51:04 -0700, "Steve"
Steve@discussions.microsoft.com> wrote:
I am trying to add script commands to a wmv file via the Windows Media File
Editor. I have tried to follow the example & have actually copied the exact
code & have setup a few scripts within the file. I moved the scripts to the
header & created a new file. But for some reason.... the scripts don't run.
In theory this seems relatively easy...but i must be missing something.
Users can turn off 'enable script commands from web pages' in the
player preferences, to increase security. Is it possible this is what
you're seeing ? How about the script commands - what were they, and
did they work before you moved them to the header ?
Cheers - Neil
|
|
|
| Back to top |
|
 |
Neil Smith [MVP Digital M
Guest
|
Posted:
Mon Aug 01, 2005 8:30 pm Post subject:
Re: Media File Editor |
|
|
On Mon, 1 Aug 2005 08:46:10 -0700, "Steve"
<Steve@discussions.microsoft.com> wrote:
| Quote: | if (bstrType.toLowerCase() == "showMenu") {
|
That will never match, because "showMenu" to lower case is "showmenu"
Cheers - Neil |
|
| Back to top |
|
 |
Steve
Guest
|
Posted:
Mon Aug 01, 2005 8:30 pm Post subject:
Re: Media File Editor |
|
|
So my #3 below is incorrect. I actually want to 'stop' or 'pause' the video
in order to hold the video's position.
"Steve" wrote:
| Quote: | I found the Demo at
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/samples/internet/imedia/netshow/captioning/default.asp
I created some generic code & have tried a few different scripts such as
pause, stop, etc.;
SCRIPT FOR="wmp" EVENT="ScriptCommand(bstrType, bstrParam)"
LANGUAGE="Jscript"
if (bstrType.toLowerCase() == "showMenu") {
player=document.getElementById('wmp');
player.UiMode="none";
}
/SCRIPT
Within the editor, I opened the file & added scripts. The 'type' would be
the name, 'showMenu', with a parameter of, '1'. Once i get it working I will
define the differences of 0, 1, 2, etc.
The script does not seem to fire. Even if on purpose I place an error in
the script, the error does not fire.
My objective for the scripts will be the following;
1. Set the UiMode=none on entry of video.
2. Show a menu item during the video.
3. Replace video with an image when completed.
I'm not sure if i mentioned before that I am using the Media Server &
streaming the video.
My IE explorer has not shown any warnings and is set to the default security
setting.
Thanks again Neil!
Steve.
"Neil Smith [MVP Digital Media]" wrote:
On Sat, 30 Jul 2005 09:09:04 -0700, "Steve"
Steve@discussions.microsoft.com> wrote:
Hello again Neil
So actually I haven't gotten this to work at all. The example works when I
run it from the demo site. I got the demo code... placed it in my app...
I'm confused - which demo code do you mean, and which app are you
talking about ?
took one of my video's & using the Media File Editor added scritps to it. I
tried that....and that didn't work... so then I tried the option of moving
I think we need to define what "didn't work" means ? What were your
script commands, what effect did you intend to see ?
the scripts to the header & that didn't work either. I think my next step on
Monday will be to just setup the demo code & video to see that work on my
server. By the way, i'm streaming with the media server & a web form object.
So do you think you might have either a cross-zone scripting problem
here (trying to go from an IE security zone with a lower setting like
internet, to a higher setting like local zone or UNC server name) ?
Cheers - Neil
"Neil Smith [MVP Digital Media]" wrote:
On Fri, 29 Jul 2005 14:51:04 -0700, "Steve"
Steve@discussions.microsoft.com> wrote:
I am trying to add script commands to a wmv file via the Windows Media File
Editor. I have tried to follow the example & have actually copied the exact
code & have setup a few scripts within the file. I moved the scripts to the
header & created a new file. But for some reason.... the scripts don't run.
In theory this seems relatively easy...but i must be missing something.
Users can turn off 'enable script commands from web pages' in the
player preferences, to increase security. Is it possible this is what
you're seeing ? How about the script commands - what were they, and
did they work before you moved them to the header ?
Cheers - Neil
|
|
|
| Back to top |
|
 |
Neil Smith [MVP Digital M
Guest
|
Posted:
Mon Aug 01, 2005 8:30 pm Post subject:
Re: Media File Editor |
|
|
On Mon, 1 Aug 2005 10:16:57 -0700, "Steve"
<Steve@discussions.microsoft.com> wrote:
Use wmp.controls.pause() to pause the video.
You'll want to add this to your script (available on WMP9 and later,
only) so you can hold the last displayed frame when the video is
paused :
if (player.settings.isAvailable("SetMode")) {
player.settings.setMode("showFrame", true);
player.controls.pause();
}
HTH
Cheers - Nei
| Quote: | So my #3 below is incorrect. I actually want to 'stop' or 'pause' the video
in order to hold the video's position.
"Steve" wrote:
I found the Demo at
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/samples/internet/imedia/netshow/captioning/default.asp
I created some generic code & have tried a few different scripts such as
pause, stop, etc.;
SCRIPT FOR="wmp" EVENT="ScriptCommand(bstrType, bstrParam)"
LANGUAGE="Jscript"
if (bstrType.toLowerCase() == "showMenu") {
player=document.getElementById('wmp');
player.UiMode="none";
}
/SCRIPT
Within the editor, I opened the file & added scripts. The 'type' would be
the name, 'showMenu', with a parameter of, '1'. Once i get it working I will
define the differences of 0, 1, 2, etc.
The script does not seem to fire. Even if on purpose I place an error in
the script, the error does not fire.
My objective for the scripts will be the following;
1. Set the UiMode=none on entry of video.
2. Show a menu item during the video.
3. Replace video with an image when completed.
I'm not sure if i mentioned before that I am using the Media Server &
streaming the video.
My IE explorer has not shown any warnings and is set to the default security
setting.
Thanks again Neil!
Steve.
"Neil Smith [MVP Digital Media]" wrote:
On Sat, 30 Jul 2005 09:09:04 -0700, "Steve"
Steve@discussions.microsoft.com> wrote:
Hello again Neil
So actually I haven't gotten this to work at all. The example works when I
run it from the demo site. I got the demo code... placed it in my app...
I'm confused - which demo code do you mean, and which app are you
talking about ?
took one of my video's & using the Media File Editor added scritps to it. I
tried that....and that didn't work... so then I tried the option of moving
I think we need to define what "didn't work" means ? What were your
script commands, what effect did you intend to see ?
the scripts to the header & that didn't work either. I think my next step on
Monday will be to just setup the demo code & video to see that work on my
server. By the way, i'm streaming with the media server & a web form object.
So do you think you might have either a cross-zone scripting problem
here (trying to go from an IE security zone with a lower setting like
internet, to a higher setting like local zone or UNC server name) ?
Cheers - Neil
"Neil Smith [MVP Digital Media]" wrote:
On Fri, 29 Jul 2005 14:51:04 -0700, "Steve"
Steve@discussions.microsoft.com> wrote:
I am trying to add script commands to a wmv file via the Windows Media File
Editor. I have tried to follow the example & have actually copied the exact
code & have setup a few scripts within the file. I moved the scripts to the
header & created a new file. But for some reason.... the scripts don't run.
In theory this seems relatively easy...but i must be missing something.
Users can turn off 'enable script commands from web pages' in the
player preferences, to increase security. Is it possible this is what
you're seeing ? How about the script commands - what were they, and
did they work before you moved them to the header ?
Cheers - Neil
|
|
|
| Back to top |
|
 |
|
|
|
|