Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #35420 > unrolled thread

video and cross origin

Started byAndrew Poulos <ap_prog@hotmail.com>
First post2018-07-13 12:59 +1000
Last post2018-07-16 00:55 +0200
Articles 8 — 4 participants

Back to article view | Back to comp.lang.javascript


Contents

  video and cross origin Andrew Poulos <ap_prog@hotmail.com> - 2018-07-13 12:59 +1000
    Re: video and cross origin Andrew Poulos <ap_prog@hotmail.com> - 2018-07-13 14:36 +1000
      Re: video and cross origin "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-07-13 09:11 +0200
        Re: video and cross origin Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-07-13 12:10 +0100
          Re: video and cross origin "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-07-13 14:04 +0200
            Re: video and cross origin Andrew Poulos <ap_prog@hotmail.com> - 2018-07-14 18:52 +1000
              Re: video and cross origin Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-07-15 00:10 +0200
              Re: video and cross origin "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-07-16 00:55 +0200

#35420 — video and cross origin

FromAndrew Poulos <ap_prog@hotmail.com>
Date2018-07-13 12:59 +1000
Subjectvideo and cross origin
Message-ID<EImdnfkFge0ciNXGnZ2dnUU7-TPNnZ2d@westnet.com.au>
While testing locally I found that if the HTML contains a video element 
then the video plays as expected in Chrome. Yet if I dynamically 
recreate the same video element Chrome complains that

"Cross origin requests are only supported for protocol schemes: http, 
data, chrome, chrome-extension, https."

The URL for the page and the video source both start with
  file:///C:/Andrew/test/

The video's source is file:///C:/Andrew/test/sakan.mp4

Why the cross origin error when both start the same?

Andrew Poulos

[toc] | [next] | [standalone]


#35421

FromAndrew Poulos <ap_prog@hotmail.com>
Date2018-07-13 14:36 +1000
Message-ID<V9WdnS7wF57fsdXGnZ2dnUU7-cvNnZ2d@westnet.com.au>
In reply to#35420
On 13/07/2018 12:59 PM, Andrew Poulos wrote:
> While testing locally I found that if the HTML contains a video element 
> then the video plays as expected in Chrome. Yet if I dynamically 
> recreate the same video element Chrome complains that
> 
> "Cross origin requests are only supported for protocol schemes: http, 
> data, chrome, chrome-extension, https."
> 
> The URL for the page and the video source both start with
>   file:///C:/Andrew/test/
> 
> The video's source is file:///C:/Andrew/test/sakan.mp4
> 
> Why the cross origin error when both start the same?

I note that just a text track in a video element within a page eg

<video src="sakan.mp4" controls preload="auto">
  <track label="English" kind="subtitles" srclang="en" src="sakan.vtt" 
default>
</video>

also throws the cross origin error.

What really confuses me is that if I create an iframe and within it 
create a new video element pointing to a youtube video Chrome happily 
plays it.

Andrew Poulos

[toc] | [prev] | [next] | [standalone]


#35422

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2018-07-13 09:11 +0200
Message-ID<XnsA91E5D922560eejj99@194.109.6.166>
In reply to#35421
Andrew Poulos <ap_prog@hotmail.com> wrote on 13 Jul 2018 in 
comp.lang.javascript:

> On 13/07/2018 12:59 PM, Andrew Poulos wrote:
>> While testing locally I found that if the HTML contains a video element 
>> then the video plays as expected in Chrome. Yet if I dynamically 
>> recreate the same video element Chrome complains that
>> 
>> "Cross origin requests are only supported for protocol schemes: http, 
>> data, chrome, chrome-extension, https."

This clearly states what you are asking.

Do you see "file" as one of the supported schemes?

 
>> The URL for the page and the video source both start with
>>   file:///C:/Andrew/test/
>> 
>> The video's source is file:///C:/Andrew/test/sakan.mp4
>> 
>> Why the cross origin error when both start the same?
> 
> I note that just a text track in a video element within a page eg
> 
> <video src="sakan.mp4" controls preload="auto">
>   <track label="English" kind="subtitles" srclang="en" src="sakan.vtt" 
> default>
> </video>
> 
> also throws the cross origin error.
> 
> What really confuses me is that if I create an iframe and within it 
> create a new video element pointing to a youtube video Chrome happily 
> plays it.
> 
> Andrew Poulos
> 



-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#35423

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2018-07-13 12:10 +0100
Message-ID<87tvp3o0fy.fsf@bsb.me.uk>
In reply to#35422
"Evertjan." <exxjxw.hannivoort@inter.nl.net> writes:

> Andrew Poulos <ap_prog@hotmail.com> wrote on 13 Jul 2018 in 
> comp.lang.javascript:
>
>> On 13/07/2018 12:59 PM, Andrew Poulos wrote:
>>> While testing locally I found that if the HTML contains a video element 
>>> then the video plays as expected in Chrome. Yet if I dynamically 
>>> recreate the same video element Chrome complains that
>>> 
>>> "Cross origin requests are only supported for protocol schemes: http, 
>>> data, chrome, chrome-extension, https."
>
> This clearly states what you are asking.
>
> Do you see "file" as one of the supported schemes?

I think there's some miscommunication here.  Andrew is asking why the
request is considered to be "cross origin" in the first place.  In other
words, why does the question of whether this is a supported instance of
such a thing even come up?  That's a reasonable reading of the error
message.

Howver, I suspect you are right, and the error message is supposed to
answer the question, but the way it is worded does not do that.  Maybe
the message is supposed to mean something like

  "Origin checks are only supported for protocol schemes http, data,
  chrome, chrome-extension and https.  All others will be taken to be
  invalid cross-origin requests."

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#35424

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2018-07-13 14:04 +0200
Message-ID<XnsA91E8F42C8F6Beejj99@194.109.6.166>
In reply to#35423
Ben Bacarisse <ben.usenet@bsb.me.uk> wrote on 13 Jul 2018 in 
comp.lang.javascript:

> "Evertjan." <exxjxw.hannivoort@inter.nl.net> writes:
> 
>> Andrew Poulos <ap_prog@hotmail.com> wrote on 13 Jul 2018 in 
>> comp.lang.javascript:
>>
>>> On 13/07/2018 12:59 PM, Andrew Poulos wrote:
>>>> While testing locally I found that if the HTML contains a video element 
>>>> then the video plays as expected in Chrome. Yet if I dynamically 
>>>> recreate the same video element Chrome complains that
>>>> 
>>>> "Cross origin requests are only supported for protocol schemes: http, 
>>>> data, chrome, chrome-extension, https."
>>
>> This clearly states what you are asking.
>>
>> Do you see "file" as one of the supported schemes?
> 
> I think there's some miscommunication here.  Andrew is asking why the
> request is considered to be "cross origin" in the first place.  In other
> words, why does the question of whether this is a supported instance of
> such a thing even come up?  That's a reasonable reading of the error
> message.
> 
> Howver, I suspect you are right, and the error message is supposed to
> answer the question, but the way it is worded does not do that.  Maybe
> the message is supposed to mean something like
> 
>   "Origin checks are only supported for protocol schemes http, data,
>   chrome, chrome-extension and https.  All others will be taken to be
>   invalid cross-origin requests."

Much better worded, indeed.

Please don't use it for a Brexit policy definition.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#35425

FromAndrew Poulos <ap_prog@hotmail.com>
Date2018-07-14 18:52 +1000
Message-ID<QrednVaPMsVRJNTGnZ2dnUU7-d3NnZ2d@westnet.com.au>
In reply to#35424
On 13/07/2018 10:04 PM, Evertjan. wrote:
> Ben Bacarisse <ben.usenet@bsb.me.uk> wrote on 13 Jul 2018 in
> comp.lang.javascript:
> 
>> "Evertjan." <exxjxw.hannivoort@inter.nl.net> writes:
>>
>>> Andrew Poulos <ap_prog@hotmail.com> wrote on 13 Jul 2018 in
>>> comp.lang.javascript:
>>>
>>>> On 13/07/2018 12:59 PM, Andrew Poulos wrote:
>>>>> While testing locally I found that if the HTML contains a video element
>>>>> then the video plays as expected in Chrome. Yet if I dynamically
>>>>> recreate the same video element Chrome complains that
>>>>>
>>>>> "Cross origin requests are only supported for protocol schemes: http,
>>>>> data, chrome, chrome-extension, https."
>>>
>>> This clearly states what you are asking.
>>>
>>> Do you see "file" as one of the supported schemes?
>>
>> I think there's some miscommunication here.  Andrew is asking why the
>> request is considered to be "cross origin" in the first place.  In other
>> words, why does the question of whether this is a supported instance of
>> such a thing even come up?  That's a reasonable reading of the error
>> message.
>>
>> However, I suspect you are right, and the error message is supposed to
>> answer the question, but the way it is worded does not do that.  Maybe
>> the message is supposed to mean something like
>>
>>    "Origin checks are only supported for protocol schemes http, data,
>>    chrome, chrome-extension and https.  All others will be taken to be
>>    invalid cross-origin requests."
> 
> Much better worded, indeed.

Maybe it makes sense to you but it still escapes me:

I include the video HTML in the page --> no error
I include a text track with the video HTML in the page --> error
I dynamically add the same video HTML, but without the text track, to 
the page --> error
I dynamically add an iframe whose source is the video --> no error

Andrew Poulos

[toc] | [prev] | [next] | [standalone]


#35427

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2018-07-15 00:10 +0200
Message-ID<cad1125d-8ca1-86a8-5fc6-85615640b19d@PointedEars.de>
In reply to#35425
Andrew Poulos wrote:
> I include the video HTML in the page --> no error
> I include a text track with the video HTML in the page --> error
> I dynamically add the same video HTML, but without the text track, to 
> the page --> error
> I dynamically add an iframe whose source is the video --> no error

Post the source code.

-- 
When all you know is jQuery, every problem looks $(olvable).

[toc] | [prev] | [next] | [standalone]


#35430

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2018-07-16 00:55 +0200
Message-ID<XnsA92195D588AAeejj99@194.109.6.166>
In reply to#35425
Andrew Poulos <ap_prog@hotmail.com> wrote on 14 Jul 2018 in 
comp.lang.javascript:

>>>    "Origin checks are only supported for protocol schemes http, data,
>>>    chrome, chrome-extension and https.  All others will be taken to be
>>>    invalid cross-origin requests."
>> 
>> Much better worded, indeed.
> 
> Maybe it makes sense to you but it still escapes me:
> 
> I include the video HTML in the page --> no error
> I include a text track with the video HTML in the page --> error
> I dynamically add the same video HTML, but without the text track, to 
> the page --> error
> I dynamically add an iframe whose source is the video --> no error

Well, a well worded principle does not per se explain any implementation,
as that requires knowledge of the interpretation of the implementator. 





-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web