Setting Source for Xamarin.Forms VideoPlayer












0















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.










share|improve this question























  • You might need to replace & with &amp; 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
















0















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.










share|improve this question























  • You might need to replace & with &amp; 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














0












0








0








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.










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 21 '18 at 13:22









David ShochetDavid Shochet

1,853102959




1,853102959













  • You might need to replace & with &amp; 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 &amp; 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 &amp; In your URL

– CGPA6.4
Nov 21 '18 at 13:38







You might need to replace & with &amp; 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












2 Answers
2






active

oldest

votes


















2















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 &amp;. For more information visit @Paul answer.






share|improve this answer































    1














    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



    < = &lt;
    > = &gt;
    " = &quot;
    ' = &apos;
    & = &amp;


    Hence you should change your XAML to



    <video:VideoPlayer x:Name="videoPlayer"
    Grid.Row="0" Source="https://www.youtube.com/watch?v=Jwcgm5VYV-U&amp;list=PLyjPaKJQuCEzqQKdA8FsQdsJ77XbjKkBH" />





    share|improve this answer
























    • 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













    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
    });


    }
    });














    draft saved

    draft discarded


















    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









    2















    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 &amp;. For more information visit @Paul answer.






    share|improve this answer




























      2















      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 &amp;. For more information visit @Paul answer.






      share|improve this answer


























        2












        2








        2








        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 &amp;. For more information visit @Paul answer.






        share|improve this 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 &amp;. For more information visit @Paul answer.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 21 '18 at 14:23









        CGPA6.4CGPA6.4

        2,63121029




        2,63121029

























            1














            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



            < = &lt;
            > = &gt;
            " = &quot;
            ' = &apos;
            & = &amp;


            Hence you should change your XAML to



            <video:VideoPlayer x:Name="videoPlayer"
            Grid.Row="0" Source="https://www.youtube.com/watch?v=Jwcgm5VYV-U&amp;list=PLyjPaKJQuCEzqQKdA8FsQdsJ77XbjKkBH" />





            share|improve this answer
























            • 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


















            1














            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



            < = &lt;
            > = &gt;
            " = &quot;
            ' = &apos;
            & = &amp;


            Hence you should change your XAML to



            <video:VideoPlayer x:Name="videoPlayer"
            Grid.Row="0" Source="https://www.youtube.com/watch?v=Jwcgm5VYV-U&amp;list=PLyjPaKJQuCEzqQKdA8FsQdsJ77XbjKkBH" />





            share|improve this answer
























            • 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
















            1












            1








            1







            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



            < = &lt;
            > = &gt;
            " = &quot;
            ' = &apos;
            & = &amp;


            Hence you should change your XAML to



            <video:VideoPlayer x:Name="videoPlayer"
            Grid.Row="0" Source="https://www.youtube.com/watch?v=Jwcgm5VYV-U&amp;list=PLyjPaKJQuCEzqQKdA8FsQdsJ77XbjKkBH" />





            share|improve this answer













            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



            < = &lt;
            > = &gt;
            " = &quot;
            ' = &apos;
            & = &amp;


            Hence you should change your XAML to



            <video:VideoPlayer x:Name="videoPlayer"
            Grid.Row="0" Source="https://www.youtube.com/watch?v=Jwcgm5VYV-U&amp;list=PLyjPaKJQuCEzqQKdA8FsQdsJ77XbjKkBH" />






            share|improve this answer












            share|improve this answer



            share|improve this answer










            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





















            • 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




















            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

            Alcedinidae

            RAC Tourist Trophy