Setting Source for Xamarin.Forms VideoPlayer
I am trying to make my application play youtube playlist videos. I set the Source:
<video:VideoPlayer x:Name="videoPlayer"
Grid.Row="0" Source="https://www.youtube.com/watch?v=Jwcgm5VYV-U&list=PLyjPaKJQuCEzqQKdA8FsQdsJ77XbjKkBH" />
But got an error:
Error '=' is an unexpected token. The expected token is ';'.
Could you please tell how I can deal with this issue?
Thanks.
video xamarin.forms xamarin.uwp
add a comment |
I am trying to make my application play youtube playlist videos. I set the Source:
<video:VideoPlayer x:Name="videoPlayer"
Grid.Row="0" Source="https://www.youtube.com/watch?v=Jwcgm5VYV-U&list=PLyjPaKJQuCEzqQKdA8FsQdsJ77XbjKkBH" />
But got an error:
Error '=' is an unexpected token. The expected token is ';'.
Could you please tell how I can deal with this issue?
Thanks.
video xamarin.forms xamarin.uwp
You might need to replace&
with&
In your URL
– CGPA6.4
Nov 21 '18 at 13:38
@CGPA6.4 Thank you! I could run the application now, but the player shows: Error: Unsupported video type or invalid file path. Maybe it has nothing to do with my original question, or does it?
– David Shochet
Nov 21 '18 at 13:43
I can't say no because we are changing url. Try setting url from code behind & check what happens.
– CGPA6.4
Nov 21 '18 at 13:46
@CGPA6.4 Same result, so I guess it is not the right way to play a play list from url. I will create another question. But as you were first who suggested a solution, would you like to make the replacement of & as an answer, so I could mark it as such? I will wait for 15 minutes before marking the answer. Thank you very much for your help.
– David Shochet
Nov 21 '18 at 14:17
add a comment |
I am trying to make my application play youtube playlist videos. I set the Source:
<video:VideoPlayer x:Name="videoPlayer"
Grid.Row="0" Source="https://www.youtube.com/watch?v=Jwcgm5VYV-U&list=PLyjPaKJQuCEzqQKdA8FsQdsJ77XbjKkBH" />
But got an error:
Error '=' is an unexpected token. The expected token is ';'.
Could you please tell how I can deal with this issue?
Thanks.
video xamarin.forms xamarin.uwp
I am trying to make my application play youtube playlist videos. I set the Source:
<video:VideoPlayer x:Name="videoPlayer"
Grid.Row="0" Source="https://www.youtube.com/watch?v=Jwcgm5VYV-U&list=PLyjPaKJQuCEzqQKdA8FsQdsJ77XbjKkBH" />
But got an error:
Error '=' is an unexpected token. The expected token is ';'.
Could you please tell how I can deal with this issue?
Thanks.
video xamarin.forms xamarin.uwp
video xamarin.forms xamarin.uwp
asked Nov 21 '18 at 13:22
David ShochetDavid Shochet
1,853102959
1,853102959
You might need to replace&
with&
In your URL
– CGPA6.4
Nov 21 '18 at 13:38
@CGPA6.4 Thank you! I could run the application now, but the player shows: Error: Unsupported video type or invalid file path. Maybe it has nothing to do with my original question, or does it?
– David Shochet
Nov 21 '18 at 13:43
I can't say no because we are changing url. Try setting url from code behind & check what happens.
– CGPA6.4
Nov 21 '18 at 13:46
@CGPA6.4 Same result, so I guess it is not the right way to play a play list from url. I will create another question. But as you were first who suggested a solution, would you like to make the replacement of & as an answer, so I could mark it as such? I will wait for 15 minutes before marking the answer. Thank you very much for your help.
– David Shochet
Nov 21 '18 at 14:17
add a comment |
You might need to replace&
with&
In your URL
– CGPA6.4
Nov 21 '18 at 13:38
@CGPA6.4 Thank you! I could run the application now, but the player shows: Error: Unsupported video type or invalid file path. Maybe it has nothing to do with my original question, or does it?
– David Shochet
Nov 21 '18 at 13:43
I can't say no because we are changing url. Try setting url from code behind & check what happens.
– CGPA6.4
Nov 21 '18 at 13:46
@CGPA6.4 Same result, so I guess it is not the right way to play a play list from url. I will create another question. But as you were first who suggested a solution, would you like to make the replacement of & as an answer, so I could mark it as such? I will wait for 15 minutes before marking the answer. Thank you very much for your help.
– David Shochet
Nov 21 '18 at 14:17
You might need to replace
&
with &
In your URL– CGPA6.4
Nov 21 '18 at 13:38
You might need to replace
&
with &
In your URL– CGPA6.4
Nov 21 '18 at 13:38
@CGPA6.4 Thank you! I could run the application now, but the player shows: Error: Unsupported video type or invalid file path. Maybe it has nothing to do with my original question, or does it?
– David Shochet
Nov 21 '18 at 13:43
@CGPA6.4 Thank you! I could run the application now, but the player shows: Error: Unsupported video type or invalid file path. Maybe it has nothing to do with my original question, or does it?
– David Shochet
Nov 21 '18 at 13:43
I can't say no because we are changing url. Try setting url from code behind & check what happens.
– CGPA6.4
Nov 21 '18 at 13:46
I can't say no because we are changing url. Try setting url from code behind & check what happens.
– CGPA6.4
Nov 21 '18 at 13:46
@CGPA6.4 Same result, so I guess it is not the right way to play a play list from url. I will create another question. But as you were first who suggested a solution, would you like to make the replacement of & as an answer, so I could mark it as such? I will wait for 15 minutes before marking the answer. Thank you very much for your help.
– David Shochet
Nov 21 '18 at 14:17
@CGPA6.4 Same result, so I guess it is not the right way to play a play list from url. I will create another question. But as you were first who suggested a solution, would you like to make the replacement of & as an answer, so I could mark it as such? I will wait for 15 minutes before marking the answer. Thank you very much for your help.
– David Shochet
Nov 21 '18 at 14:17
add a comment |
2 Answers
2
active
oldest
votes
Error '=' is an unexpected token. The expected token is ';'
This is because you are using &
sign in xaml file which isn't supporting, so replace it to &
. For more information visit @Paul answer.
add a comment |
There is a bunch of characters that are illegal in XML properties or texts (XAML is an XML dialect), since they have a special meaning, see here. These are
<
>
"
' and
&
These characters will have to be escaped by the following sequences
< = <
> = >
" = "
' = '
& = &
Hence you should change your XAML to
<video:VideoPlayer x:Name="videoPlayer"
Grid.Row="0" Source="https://www.youtube.com/watch?v=Jwcgm5VYV-U&list=PLyjPaKJQuCEzqQKdA8FsQdsJ77XbjKkBH" />
Thank you! As I mentioned in my comment above, the player now shows: Error: Unsupported video type or invalid file path. Maybe it has nothing to do with my original question, or does it?
– David Shochet
Nov 21 '18 at 13:45
@DavidShochet Seems to me as if that's an issue with the component and, yes, it seems unrelated to me.
– Paul Kertscher
Nov 21 '18 at 13:46
Thank you very much. I marked CGPA6.4's answer, as he suggested the same first in his comment, but I really appreciate your help.
– David Shochet
Nov 21 '18 at 14:25
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53413001%2fsetting-source-for-xamarin-forms-videoplayer%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Error '=' is an unexpected token. The expected token is ';'
This is because you are using &
sign in xaml file which isn't supporting, so replace it to &
. For more information visit @Paul answer.
add a comment |
Error '=' is an unexpected token. The expected token is ';'
This is because you are using &
sign in xaml file which isn't supporting, so replace it to &
. For more information visit @Paul answer.
add a comment |
Error '=' is an unexpected token. The expected token is ';'
This is because you are using &
sign in xaml file which isn't supporting, so replace it to &
. For more information visit @Paul answer.
Error '=' is an unexpected token. The expected token is ';'
This is because you are using &
sign in xaml file which isn't supporting, so replace it to &
. For more information visit @Paul answer.
answered Nov 21 '18 at 14:23
CGPA6.4CGPA6.4
2,63121029
2,63121029
add a comment |
add a comment |
There is a bunch of characters that are illegal in XML properties or texts (XAML is an XML dialect), since they have a special meaning, see here. These are
<
>
"
' and
&
These characters will have to be escaped by the following sequences
< = <
> = >
" = "
' = '
& = &
Hence you should change your XAML to
<video:VideoPlayer x:Name="videoPlayer"
Grid.Row="0" Source="https://www.youtube.com/watch?v=Jwcgm5VYV-U&list=PLyjPaKJQuCEzqQKdA8FsQdsJ77XbjKkBH" />
Thank you! As I mentioned in my comment above, the player now shows: Error: Unsupported video type or invalid file path. Maybe it has nothing to do with my original question, or does it?
– David Shochet
Nov 21 '18 at 13:45
@DavidShochet Seems to me as if that's an issue with the component and, yes, it seems unrelated to me.
– Paul Kertscher
Nov 21 '18 at 13:46
Thank you very much. I marked CGPA6.4's answer, as he suggested the same first in his comment, but I really appreciate your help.
– David Shochet
Nov 21 '18 at 14:25
add a comment |
There is a bunch of characters that are illegal in XML properties or texts (XAML is an XML dialect), since they have a special meaning, see here. These are
<
>
"
' and
&
These characters will have to be escaped by the following sequences
< = <
> = >
" = "
' = '
& = &
Hence you should change your XAML to
<video:VideoPlayer x:Name="videoPlayer"
Grid.Row="0" Source="https://www.youtube.com/watch?v=Jwcgm5VYV-U&list=PLyjPaKJQuCEzqQKdA8FsQdsJ77XbjKkBH" />
Thank you! As I mentioned in my comment above, the player now shows: Error: Unsupported video type or invalid file path. Maybe it has nothing to do with my original question, or does it?
– David Shochet
Nov 21 '18 at 13:45
@DavidShochet Seems to me as if that's an issue with the component and, yes, it seems unrelated to me.
– Paul Kertscher
Nov 21 '18 at 13:46
Thank you very much. I marked CGPA6.4's answer, as he suggested the same first in his comment, but I really appreciate your help.
– David Shochet
Nov 21 '18 at 14:25
add a comment |
There is a bunch of characters that are illegal in XML properties or texts (XAML is an XML dialect), since they have a special meaning, see here. These are
<
>
"
' and
&
These characters will have to be escaped by the following sequences
< = <
> = >
" = "
' = '
& = &
Hence you should change your XAML to
<video:VideoPlayer x:Name="videoPlayer"
Grid.Row="0" Source="https://www.youtube.com/watch?v=Jwcgm5VYV-U&list=PLyjPaKJQuCEzqQKdA8FsQdsJ77XbjKkBH" />
There is a bunch of characters that are illegal in XML properties or texts (XAML is an XML dialect), since they have a special meaning, see here. These are
<
>
"
' and
&
These characters will have to be escaped by the following sequences
< = <
> = >
" = "
' = '
& = &
Hence you should change your XAML to
<video:VideoPlayer x:Name="videoPlayer"
Grid.Row="0" Source="https://www.youtube.com/watch?v=Jwcgm5VYV-U&list=PLyjPaKJQuCEzqQKdA8FsQdsJ77XbjKkBH" />
answered Nov 21 '18 at 13:43
Paul KertscherPaul Kertscher
5,00741937
5,00741937
Thank you! As I mentioned in my comment above, the player now shows: Error: Unsupported video type or invalid file path. Maybe it has nothing to do with my original question, or does it?
– David Shochet
Nov 21 '18 at 13:45
@DavidShochet Seems to me as if that's an issue with the component and, yes, it seems unrelated to me.
– Paul Kertscher
Nov 21 '18 at 13:46
Thank you very much. I marked CGPA6.4's answer, as he suggested the same first in his comment, but I really appreciate your help.
– David Shochet
Nov 21 '18 at 14:25
add a comment |
Thank you! As I mentioned in my comment above, the player now shows: Error: Unsupported video type or invalid file path. Maybe it has nothing to do with my original question, or does it?
– David Shochet
Nov 21 '18 at 13:45
@DavidShochet Seems to me as if that's an issue with the component and, yes, it seems unrelated to me.
– Paul Kertscher
Nov 21 '18 at 13:46
Thank you very much. I marked CGPA6.4's answer, as he suggested the same first in his comment, but I really appreciate your help.
– David Shochet
Nov 21 '18 at 14:25
Thank you! As I mentioned in my comment above, the player now shows: Error: Unsupported video type or invalid file path. Maybe it has nothing to do with my original question, or does it?
– David Shochet
Nov 21 '18 at 13:45
Thank you! As I mentioned in my comment above, the player now shows: Error: Unsupported video type or invalid file path. Maybe it has nothing to do with my original question, or does it?
– David Shochet
Nov 21 '18 at 13:45
@DavidShochet Seems to me as if that's an issue with the component and, yes, it seems unrelated to me.
– Paul Kertscher
Nov 21 '18 at 13:46
@DavidShochet Seems to me as if that's an issue with the component and, yes, it seems unrelated to me.
– Paul Kertscher
Nov 21 '18 at 13:46
Thank you very much. I marked CGPA6.4's answer, as he suggested the same first in his comment, but I really appreciate your help.
– David Shochet
Nov 21 '18 at 14:25
Thank you very much. I marked CGPA6.4's answer, as he suggested the same first in his comment, but I really appreciate your help.
– David Shochet
Nov 21 '18 at 14:25
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53413001%2fsetting-source-for-xamarin-forms-videoplayer%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You might need to replace
&
with&
In your URL– CGPA6.4
Nov 21 '18 at 13:38
@CGPA6.4 Thank you! I could run the application now, but the player shows: Error: Unsupported video type or invalid file path. Maybe it has nothing to do with my original question, or does it?
– David Shochet
Nov 21 '18 at 13:43
I can't say no because we are changing url. Try setting url from code behind & check what happens.
– CGPA6.4
Nov 21 '18 at 13:46
@CGPA6.4 Same result, so I guess it is not the right way to play a play list from url. I will create another question. But as you were first who suggested a solution, would you like to make the replacement of & as an answer, so I could mark it as such? I will wait for 15 minutes before marking the answer. Thank you very much for your help.
– David Shochet
Nov 21 '18 at 14:17