Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Entertainment » microsoft.public.windowsmedia.sdk
Thread: How to turn off or by pass permission denied error or access right

HTVi
TV Discussion Newsgroups

How to turn off or by pass permission denied error or access right
Cu_Teo_Sj 5/7/2007 10:46:01 PM
Hi,



I am trying to embed video (playlist) in my local machine html/javascript.
In my script when I want to add media to playlist by using:



Player.currentPlayList.appendItems(media);



I will get the the permission denied error. This problem did not exist in
media player 9. After doing some reseach I found out that media player 10
and 11 has additional security which required me to do:



Player.settings.requestMediaAccessRights('full');



Wthis code the video will play fine but there will be a pop up asking for
confirmation from user. Right now I am develop a small project which run on
local machine so there is no security issue I need to worry. Each time when
i want to play something the confirmation will pop up and it turn out to be
very annoying. Is there anyway I could either by pass the permission or the
confirmation diaglog box?



Thanks

-Due Nguyen

duenguyen[ at ]yahoo.com

Re: How to turn off or by pass permission denied error or access right
"Neil Smith [MVP Digital Media]" <neil[ at ]nospam.com> 5/8/2007 5:45:54 PM
On Mon, 7 May 2007 15:46:01 -0700, Cu_Teo_Sj
<Cu_Teo_Sj[ at ]discussions.microsoft.com> wrote:

[Quoted Text]
>Hi,
>
>
>
>I am trying to embed video (playlist) in my local machine html/javascript.
>In my script when I want to add media to playlist by using:
>
>
>
>Player.currentPlayList.appendItems(media);
>
>
>
>I will get the the permission denied error. This problem did not exist in
>media player 9. After doing some reseach I found out that media player 10
>and 11 has additional security which required me to do:
>
>
>
>Player.settings.requestMediaAccessRights('full');
>
>
>
>Wthis code the video will play fine but there will be a pop up asking for
>confirmation from user. Right now I am develop a small project which run on
>local machine so there is no security issue I need to worry. Each time when
>i want to play something the confirmation will pop up and it turn out to be
>very annoying. Is there anyway I could either by pass the permission or the
>confirmation diaglog box?
>


Use an .hta (HTML Application) in IE instead of HTML + Javascript.

You may possibly be able to subvert this using "mark of the web" (ref
http://msdn2.microsoft.com/en-us/library/ms537628.aspx) but I doubt
it, since you're trying to end-run around a deliberately built in
security feature of the player.

Cheers - Neil
------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
Re: How to turn off or by pass permission denied error or access r
Cu_Teo_Sj 5/8/2007 7:32:00 PM
Dear Neil,

Thanks for your reply, it was my fault to mention html. It is actually an
asp page which been envoke through IIS. Yet still i tried with the MOW but
it does not work.

Thanks
-Due Nguyen

"Neil Smith [MVP Digital Media]" wrote:

[Quoted Text]
> On Mon, 7 May 2007 15:46:01 -0700, Cu_Teo_Sj
> <Cu_Teo_Sj[ at ]discussions.microsoft.com> wrote:
>
> >Hi,
> >
> >
> >
> >I am trying to embed video (playlist) in my local machine html/javascript.
> >In my script when I want to add media to playlist by using:
> >
> >
> >
> >Player.currentPlayList.appendItems(media);
> >
> >
> >
> >I will get the the permission denied error. This problem did not exist in
> >media player 9. After doing some reseach I found out that media player 10
> >and 11 has additional security which required me to do:
> >
> >
> >
> >Player.settings.requestMediaAccessRights('full');
> >
> >
> >
> >Wthis code the video will play fine but there will be a pop up asking for
> >confirmation from user. Right now I am develop a small project which run on
> >local machine so there is no security issue I need to worry. Each time when
> >i want to play something the confirmation will pop up and it turn out to be
> >very annoying. Is there anyway I could either by pass the permission or the
> >confirmation diaglog box?
> >
>
>
> Use an .hta (HTML Application) in IE instead of HTML + Javascript.
>
> You may possibly be able to subvert this using "mark of the web" (ref
> http://msdn2.microsoft.com/en-us/library/ms537628.aspx) but I doubt
> it, since you're trying to end-run around a deliberately built in
> security feature of the player.
>
> Cheers - Neil
> ------------------------------------------------
> Digital Media MVP : 2004-2007
> http://mvp.support.microsoft.com/mvpfaqs
>
Re: How to turn off or by pass permission denied error or access r
Cu_Teo_Sj 5/9/2007 5:01:02 AM
I tried several appoarch yet it does not work include making the file into
hta as recommended. I tried to pass in the url (just as string) and play it
but the problem is I have to make sure the file is existed. By doing so I
have to use FSO which does not work on client side. I am kind a running out
of option here. I guess my question is if there is anyway (perhaps within
the setting or HKEY or even code wise) so that user don't have to go through
these hassel even if user does should there be some kind of setting which
user only have to do it once, since this is visted website already (cache
perhaps?)

Best Regard
-Due Nguyen

"Neil Smith [MVP Digital Media]" wrote:

[Quoted Text]
> On Mon, 7 May 2007 15:46:01 -0700, Cu_Teo_Sj
> <Cu_Teo_Sj[ at ]discussions.microsoft.com> wrote:
>
> >Hi,
> >
> >
> >
> >I am trying to embed video (playlist) in my local machine html/javascript.
> >In my script when I want to add media to playlist by using:
> >
> >
> >
> >Player.currentPlayList.appendItems(media);
> >
> >
> >
> >I will get the the permission denied error. This problem did not exist in
> >media player 9. After doing some reseach I found out that media player 10
> >and 11 has additional security which required me to do:
> >
> >
> >
> >Player.settings.requestMediaAccessRights('full');
> >
> >
> >
> >Wthis code the video will play fine but there will be a pop up asking for
> >confirmation from user. Right now I am develop a small project which run on
> >local machine so there is no security issue I need to worry. Each time when
> >i want to play something the confirmation will pop up and it turn out to be
> >very annoying. Is there anyway I could either by pass the permission or the
> >confirmation diaglog box?
> >
>
>
> Use an .hta (HTML Application) in IE instead of HTML + Javascript.
>
> You may possibly be able to subvert this using "mark of the web" (ref
> http://msdn2.microsoft.com/en-us/library/ms537628.aspx) but I doubt
> it, since you're trying to end-run around a deliberately built in
> security feature of the player.
>
> Cheers - Neil
> ------------------------------------------------
> Digital Media MVP : 2004-2007
> http://mvp.support.microsoft.com/mvpfaqs
>
Re: How to turn off or by pass permission denied error or access r
Cu_Teo_Sj 5/9/2007 6:05:00 AM
Hi Neil,

A new finding is when I have the html file run locally then it work ok but
when I try to run through IIS that is when I have the permission denied
error. Here is some of the sample code. Please save this as test.html and
find any two .avi files name them as 1.avi and 2.avi but them in the same
folder under IIS directory and launch using localhost/directory/test.html
and the other way is just to double click on the file. And again if I put
the requestMeidaAccessRight then it will play but the annoying pop up will
come up. Do you have any idea how to prevent this or only display this pop
up only once?

Thanks in advance
-Due

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<script language="javascript">
var g_timerInterval = null;

function Init()
{
MediaPlayer.windowlessVideo = false;

MediaPlayer.currentPlaylist.appendItem(MediaPlayer.newMedia("1.avi"));
MediaPlayer.currentPlaylist.appendItem(MediaPlayer.newMedia("2.avi"));
MediaPlayer.controls.play();
}
</script>
</head>
<body onload="Init()">

<OBJECT ID="MediaPlayer"
CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject" width=480 height=360 VIEWASTEXT>
<PARAM NAME="AutoStart" VALUE="true">
<PARAM NAME="EnableContextMenu" VALUE="false">
<PARAM NAME="uiMode" VALUE="full">
<PARAM NAME="SendErrorEvents" VALUE="true">
<PARAM NAME="SendOpenStateChangeEvents" VALUE="true">
<PARAM NAME="windowlessVideo" VALUE="false">
</OBJECT>
</body>
</html>


"Neil Smith [MVP Digital Media]" wrote:

[Quoted Text]
> On Mon, 7 May 2007 15:46:01 -0700, Cu_Teo_Sj
> <Cu_Teo_Sj[ at ]discussions.microsoft.com> wrote:
>
> >Hi,
> >
> >
> >
> >I am trying to embed video (playlist) in my local machine html/javascript.
> >In my script when I want to add media to playlist by using:
> >
> >
> >
> >Player.currentPlayList.appendItems(media);
> >
> >
> >
> >I will get the the permission denied error. This problem did not exist in
> >media player 9. After doing some reseach I found out that media player 10
> >and 11 has additional security which required me to do:
> >
> >
> >
> >Player.settings.requestMediaAccessRights('full');
> >
> >
> >
> >Wthis code the video will play fine but there will be a pop up asking for
> >confirmation from user. Right now I am develop a small project which run on
> >local machine so there is no security issue I need to worry. Each time when
> >i want to play something the confirmation will pop up and it turn out to be
> >very annoying. Is there anyway I could either by pass the permission or the
> >confirmation diaglog box?
> >
>
>
> Use an .hta (HTML Application) in IE instead of HTML + Javascript.
>
> You may possibly be able to subvert this using "mark of the web" (ref
> http://msdn2.microsoft.com/en-us/library/ms537628.aspx) but I doubt
> it, since you're trying to end-run around a deliberately built in
> security feature of the player.
>
> Cheers - Neil
> ------------------------------------------------
> Digital Media MVP : 2004-2007
> http://mvp.support.microsoft.com/mvpfaqs
>
Re: How to turn off or by pass permission denied error or access r
"Neil Smith [MVP Digital Media]" <neil[ at ]nospam.com> 5/9/2007 5:52:47 PM
On Tue, 8 May 2007 23:05:00 -0700, Cu_Teo_Sj
<CuTeoSj[ at ]discussions.microsoft.com> wrote:

[Quoted Text]
>Hi Neil,
>
>A new finding is when I have the html file run locally then it work ok but
>when I try to run through IIS that is when I have the permission denied



I know. It's a cross domain issue which is to be expected.

If you are hosting from a web server (even "localhost") as explained
befor, you will be required by the player to request media access
rights.

There's no client-side workaround for this perfectly reasonable
security restriction (being able to read and/or write a users private
media library *is* a security issue)

You could instead make your playlist dynamically at the server end, as
requested by user actions (perhaps using AJAX to prevent page
refreshses is one approach)

Cheers - Neil


>> Use an .hta (HTML Application) in IE instead of HTML + Javascript.
>>
>> You may possibly be able to subvert this using "mark of the web" (ref
>> http://msdn2.microsoft.com/en-us/library/ms537628.aspx) but I doubt
>> it, since you're trying to end-run around a deliberately built in
>> security feature of the player.
------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
Re: How to turn off or by pass permission denied error or access r
Cu_Teo_Sj 5/10/2007 11:51:01 PM


"Neil Smith [MVP Digital Media]" wrote:

[Quoted Text]
> On Tue, 8 May 2007 23:05:00 -0700, Cu_Teo_Sj
> <CuTeoSj[ at ]discussions.microsoft.com> wrote:
>
> >Hi Neil,
> >
> >A new finding is when I have the html file run locally then it work ok but
> >when I try to run through IIS that is when I have the permission denied
>
>
>
> I know. It's a cross domain issue which is to be expected.
>
> If you are hosting from a web server (even "localhost") as explained
> befor, you will be required by the player to request media access
> rights.
>
> There's no client-side workaround for this perfectly reasonable
> security restriction (being able to read and/or write a users private
> media library *is* a security issue)
>
> You could instead make your playlist dynamically at the server end, as
> requested by user actions (perhaps using AJAX to prevent page
> refreshses is one approach)
>
> Cheers - Neil
>
>
> >> Use an .hta (HTML Application) in IE instead of HTML + Javascript.
> >>
> >> You may possibly be able to subvert this using "mark of the web" (ref
> >> http://msdn2.microsoft.com/en-us/library/ms537628.aspx) but I doubt
> >> it, since you're trying to end-run around a deliberately built in
> >> security feature of the player.
> ------------------------------------------------
> Digital Media MVP : 2004-2007
> http://mvp.support.microsoft.com/mvpfaqs
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen