•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 456,482 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,828 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 3740 | Replies: 3
![]() |
•
•
Join Date: Jan 2007
Posts: 8
Reputation:
Rep Power: 0
Solved Threads: 0
Hello and thank you to those who responded to my earlier
request for a script to hide media control panels. As a result,
I have tried the following suggested script, but I still
can't seem to get it right. But, I think I'm getting close ;-)
I could not find an answer to the problem in FAQ.
__________________________________________________________
function handleControlsOnOffClick() {
if (document.mediaPlayer.showControls == true) {
document.mediaPlayer.showControls = false;
document.playerCtrl.controls.value = " Show Controls ";
}
else {
document.mediaPlayer.showControls = true;
document.playerCtrl.controls.value = " Hide Controls "
}
}
__________________________________________________________
To be more explicit, I'm repeating the desired result on my proposed website.
1. After an end user requests a download of my e-book, they
will be invited to click on various hyperlinks to activate music,
from files that will be included in the download and therefore
already on their hard-drive. The music is intended to be merely
short background pieces, but controlled by the user by clicking on
a link - (Not like a bg music loop playing automatically when a website
is acccessed).
2. When clicking on the hyperlink, I don't want a user being distracted
from the text they are reading, by the usual appearance of a
'security message' and/or followed by the control panel of whichever
type of media player they are using.
3. Is it possible to have a script that covers ALL TYPES OF MEDIA
PLAYERS, to automatically disable all and any functions -
other than simply playing the music, without any graphics, control
panels, skins or security messages appearing? And without the user
having to manually minimize whatever visual material has appeared.
If so, I'd appreciate it if it could be prepared in the exact
HTML format - ready for pasting into the 'source code' of the page.
Also, please advise precisely where in the code, it should be placed.
Thank you for your patience and assistance.
Bob
request for a script to hide media control panels. As a result,
I have tried the following suggested script, but I still
can't seem to get it right. But, I think I'm getting close ;-)
I could not find an answer to the problem in FAQ.
__________________________________________________________
function handleControlsOnOffClick() {
if (document.mediaPlayer.showControls == true) {
document.mediaPlayer.showControls = false;
document.playerCtrl.controls.value = " Show Controls ";
}
else {
document.mediaPlayer.showControls = true;
document.playerCtrl.controls.value = " Hide Controls "
}
}
__________________________________________________________
To be more explicit, I'm repeating the desired result on my proposed website.
1. After an end user requests a download of my e-book, they
will be invited to click on various hyperlinks to activate music,
from files that will be included in the download and therefore
already on their hard-drive. The music is intended to be merely
short background pieces, but controlled by the user by clicking on
a link - (Not like a bg music loop playing automatically when a website
is acccessed).
2. When clicking on the hyperlink, I don't want a user being distracted
from the text they are reading, by the usual appearance of a
'security message' and/or followed by the control panel of whichever
type of media player they are using.
3. Is it possible to have a script that covers ALL TYPES OF MEDIA
PLAYERS, to automatically disable all and any functions -
other than simply playing the music, without any graphics, control
panels, skins or security messages appearing? And without the user
having to manually minimize whatever visual material has appeared.
If so, I'd appreciate it if it could be prepared in the exact
HTML format - ready for pasting into the 'source code' of the page.
Also, please advise precisely where in the code, it should be placed.
Thank you for your patience and assistance. Bob
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 971
Reputation:
Rep Power: 5
Solved Threads: 48
Default security settings for offline content are quite strict; because offline content is supposed to have access to its immediate environment (the user's filesystem) For that reason, you may not be able to disable security dialogues. They wouldn't be very secure if you could.
If your hyperlinks are just hrefs to the files on the user's computer; you have absolutely no control over how a browser or a user chooses to deal with those files; in the same way as you have no control over whether a user chooses to open or save a file when presented with a download box. There's plenty of good reasons why.
If you were to change your tactics somewhat, and embed the music onto your pages; you'd have alot more control over the display of the embedded media player; but perhaps still security errors if you're accessing local content (files on the user's machine), and it'll be more work for you developing a way to access the (hidden) media players.
For code to embed a WindowsMediaPlayer into an HTML page:
http://www.mioplanet.com/rsc/embed_mediaplayer.htm
If you want to hide that player, remove this line:
and replace it with this line:
if you want it to not play automatically; remove this line:
and see the bit at the bottom of that page for controlling the player using Javascript.
If your hyperlinks are just hrefs to the files on the user's computer; you have absolutely no control over how a browser or a user chooses to deal with those files; in the same way as you have no control over whether a user chooses to open or save a file when presented with a download box. There's plenty of good reasons why.
If you were to change your tactics somewhat, and embed the music onto your pages; you'd have alot more control over the display of the embedded media player; but perhaps still security errors if you're accessing local content (files on the user's machine), and it'll be more work for you developing a way to access the (hidden) media players.
For code to embed a WindowsMediaPlayer into an HTML page:
http://www.mioplanet.com/rsc/embed_mediaplayer.htm
If you want to hide that player, remove this line:
style="position:absolute; left:0;top:0;"
and replace it with this line:
display="none"
if you want it to not play automatically; remove this line:
<PARAM NAME="AutoStart" VALUE="True">
and see the bit at the bottom of that page for controlling the player using Javascript.
[insert your media player ID].start() probably works to start a media player that doesn't have auto start enabled. Last edited by MattEvans : Feb 4th, 2007 at 7:05 am.
Plato forgot the nullahedron..
•
•
Join Date: Jan 2007
Posts: 8
Reputation:
Rep Power: 0
Solved Threads: 0
Thank you for your very detailed reply.
I will digest all of that and come back to you if I need further help.
Regards
Bob
I will digest all of that and come back to you if I need further help.
Regards
Bob
•
•
•
•
Default security settings for offline content are quite strict; because offline content is supposed to have access to its immediate environment (the user's filesystem) For that reason, you may not be able to disable security dialogues. They wouldn't be very secure if you could.
If your hyperlinks are just hrefs to the files on the user's computer; you have absolutely no control over how a browser or a user chooses to deal with those files; in the same way as you have no control over whether a user chooses to open or save a file when presented with a download box. There's plenty of good reasons why.
If you were to change your tactics somewhat, and embed the music onto your pages; you'd have alot more control over the display of the embedded media player; but perhaps still security errors if you're accessing local content (files on the user's machine), and it'll be more work for you developing a way to access the (hidden) media players.
For code to embed a WindowsMediaPlayer into an HTML page:
http://www.mioplanet.com/rsc/embed_mediaplayer.htm
If you want to hide that player, remove this line:style="position:absolute; left:0;top:0;"
and replace it with this line:
display="none"
if you want it to not play automatically; remove this line:
<PARAM NAME="AutoStart" VALUE="True">
and see the bit at the bottom of that page for controlling the player using Javascript.[insert your media player ID].start()probably works to start a media player that doesn't have auto start enabled.
![]() |
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
adobe audio bebo blog branding code css development div dreamweaver economy experiment files firefox flash flv google checkout google checkout vat hd html html api india javascript jpeg media microsoft mobile devices monetization news online photo player portable media player publishing recession social networking software stocks streaming symantec tables tips video w3c web wifi windows wysiwyg xml
- Hide ALL media player control panels (JavaScript / DHTML / AJAX)
- media players freeze (Windows 9x / Me)
Other Threads in the HTML and CSS Forum
- Previous Thread: Encrypting HTML Code and SEO Pickup...
- Next Thread: Tables: Cell content alignment?



Linear Mode