Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. LAMP
  3. Cloudron+LAMP: Tiktok Embed problems

Cloudron+LAMP: Tiktok Embed problems

Scheduled Pinned Locked Moved LAMP
40 Posts 8 Posters 3.9k Views 8 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jaschaezraJ jaschaezra

    @squareclouds I can confirm this on latest iOS. Sitting in a train and can not further investigate.

    The play button is rendered but is not clickable while the buttons on the right all link to TikTok (as they should)

    girishG Offline
    girishG Offline
    girish
    Staff
    wrote on last edited by
    #22

    @jaschaezra thanks for testing.

    @squareclouds ok, we can reproduce this too . Looks like a Safari specific issue. Mac/Firefox and Mac/Chrome plays fine (can you confirm this?)

    In https://www.buzzfeed.com/buzzfeedstaff/how-to-get-tiktoks-to-play and https://florisdeleeuwnl.zendesk.com/hc/en-us/articles/360013564340-Embedded-video-not-working-in-Safari , they suggest unchecking "Prevent Cross-Site Tracking" but atleast here that doesn't help.

    S 1 Reply Last reply
    0
    • S squareclouds

      @girish you can play the embed? because it loads, yes, but the playing is the problem. it does not autoplay nor you can play it by clicking it, it has no interaction

      we are still not live, so we are only a few people, but yes, its not only on my macs and iphones (i have an old iphone and old mac as well, so me alone have tested on 4 devices and then the lead designer as well).

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #23

      @squareclouds do you happen to have your website hosting link with the tiktok embed? No idea what's going on at this point. We have to compare what is working and what is not.

      1 Reply Last reply
      0
      • girishG girish

        @jaschaezra thanks for testing.

        @squareclouds ok, we can reproduce this too . Looks like a Safari specific issue. Mac/Firefox and Mac/Chrome plays fine (can you confirm this?)

        In https://www.buzzfeed.com/buzzfeedstaff/how-to-get-tiktoks-to-play and https://florisdeleeuwnl.zendesk.com/hc/en-us/articles/360013564340-Embedded-video-not-working-in-Safari , they suggest unchecking "Prevent Cross-Site Tracking" but atleast here that doesn't help.

        S Offline
        S Offline
        squareclouds
        wrote on last edited by girish
        #24

        @girish yes, I confirm that on mac only safari has this issue, on iOS it is all browsers (maybe because they have to go through the app store?)

        hmm, sure, technically I shouldn't share it but since it is for its own sake:

        again, I think we were close already with the CORS, because tiktok tries to reach to the website from the iframe. is there a way that I can explicitly allow it to see what happens?

        girishG 1 Reply Last reply
        0
        • S squareclouds

          @girish yes, I confirm that on mac only safari has this issue, on iOS it is all browsers (maybe because they have to go through the app store?)

          hmm, sure, technically I shouldn't share it but since it is for its own sake:

          again, I think we were close already with the CORS, because tiktok tries to reach to the website from the iframe. is there a way that I can explicitly allow it to see what happens?

          girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #25

          @squareclouds I removed that link, why cause concerns. You can send us the link to support@cloudron.io . As for CORS, I have already tested this part. It's not CORS related. Something to do with content blocking in safari or maybe some other configuration on nginx.

          S 1 Reply Last reply
          0
          • marcusquinnM Offline
            marcusquinnM Offline
            marcusquinn
            wrote on last edited by
            #26

            AFAIK autoplay is stopped on all browsers by default nowadays - probably because it is annoying as hell.

            OptimizePress has a good approach to this:

            • https://www.optimizepress.com/
            • https://docs.optimizepress.com/article/2759-video-autoplay-not-working/
            • https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide

            TikTok is also going to get blocked my anyone using any adblockers or tracking blocking settings in their browsers. For that you'll need an adblock banner, too:

            Ad unblock banners are also annoying, but if you have no choice but to use TikTok (which morally I wouldn't touch it, but maybe you have to just get the job done, pay billz, and move on from this client)

            • https://en-gb.wordpress.org/plugins/adunblocker/
            • https://codecanyon.net/item/deblocker-anti-adblock-for-wordpress/24086686

            Web Design https://www.evergreen.je
            Development https://brandlight.org
            Life https://marcusquinn.com

            S 1 Reply Last reply
            1
            • marcusquinnM marcusquinn

              AFAIK autoplay is stopped on all browsers by default nowadays - probably because it is annoying as hell.

              OptimizePress has a good approach to this:

              • https://www.optimizepress.com/
              • https://docs.optimizepress.com/article/2759-video-autoplay-not-working/
              • https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide

              TikTok is also going to get blocked my anyone using any adblockers or tracking blocking settings in their browsers. For that you'll need an adblock banner, too:

              Ad unblock banners are also annoying, but if you have no choice but to use TikTok (which morally I wouldn't touch it, but maybe you have to just get the job done, pay billz, and move on from this client)

              • https://en-gb.wordpress.org/plugins/adunblocker/
              • https://codecanyon.net/item/deblocker-anti-adblock-for-wordpress/24086686
              S Offline
              S Offline
              squareclouds
              wrote on last edited by
              #27

              @marcusquinn thank you, its noted. firstly it would be more important to get make it behave like on all other browsers and servers. if the user decides to block by their own will is another story

              marcusquinnM girishG 2 Replies Last reply
              0
              • S squareclouds

                @marcusquinn thank you, its noted. firstly it would be more important to get make it behave like on all other browsers and servers. if the user decides to block by their own will is another story

                marcusquinnM Offline
                marcusquinnM Offline
                marcusquinn
                wrote on last edited by
                #28

                @squareclouds Can you download the video and just embed a .mp4 file?

                I don't know what advantage TikTok embeds would have, would seem like more downsides to me, both in your cost of trying to make it work, and user privacy.

                Don't know if YouTube is any better, but that might give you a way to compare if you think this is a Cloudron setup issue, or just an issue with the way browsers work with what you're trying to do.

                Web Design https://www.evergreen.je
                Development https://brandlight.org
                Life https://marcusquinn.com

                S 1 Reply Last reply
                1
                • girishG girish

                  @squareclouds I removed that link, why cause concerns. You can send us the link to support@cloudron.io . As for CORS, I have already tested this part. It's not CORS related. Something to do with content blocking in safari or maybe some other configuration on nginx.

                  S Offline
                  S Offline
                  squareclouds
                  wrote on last edited by
                  #29

                  @girish I sent you the email yesterday, thank you for looking into this!

                  1 Reply Last reply
                  0
                  • marcusquinnM marcusquinn

                    @squareclouds Can you download the video and just embed a .mp4 file?

                    I don't know what advantage TikTok embeds would have, would seem like more downsides to me, both in your cost of trying to make it work, and user privacy.

                    Don't know if YouTube is any better, but that might give you a way to compare if you think this is a Cloudron setup issue, or just an issue with the way browsers work with what you're trying to do.

                    S Offline
                    S Offline
                    squareclouds
                    wrote on last edited by
                    #30

                    @marcusquinn not doable, I need the server to work with tiktok by its own. its not 1 video, any user can embed a tiktok, so potentially its hundreds. we also have spotify, youtube, vimeo, twitter, soundcloud and instagram embeds, all working fine. all simple things have already been tested and compared, thats why i am here. at some point I didnt know what to test anymore

                    timconsidineT 1 Reply Last reply
                    1
                    • robiR Offline
                      robiR Offline
                      robi
                      wrote on last edited by
                      #31

                      @girish said in Cloudron+LAMP: Tiktok Embed problems:

                      track

                      Blocked by default in Vivaldi.

                      8182f80f-5570-422d-85b7-b1c1ee1b605c-image.png

                      Conscious tech

                      1 Reply Last reply
                      0
                      • S squareclouds

                        @marcusquinn not doable, I need the server to work with tiktok by its own. its not 1 video, any user can embed a tiktok, so potentially its hundreds. we also have spotify, youtube, vimeo, twitter, soundcloud and instagram embeds, all working fine. all simple things have already been tested and compared, thats why i am here. at some point I didnt know what to test anymore

                        timconsidineT Offline
                        timconsidineT Offline
                        timconsidine
                        App Dev
                        wrote on last edited by timconsidine
                        #32

                        @squareclouds said in Cloudron+LAMP: Tiktok Embed problems:

                        thats why i am here. at some point I didnt know what to test anymore

                        After the extensive amount of discussion in this thread, if you haven't solved it and you still want help from the community, maybe you should share the URL of the site running on Cloudron.

                        Forum posts get indexed by search engines, so probably share a temporary alias which gets removed later.

                        Also I think I read you don't have the non-Cloudron site running. If that's correct, may I suggest you get one running again for the point of comparison, and of course share its URL (or rather an alias if needed).

                        Otherwise people trying to help are just guessing.

                        S 1 Reply Last reply
                        0
                        • S squareclouds

                          @marcusquinn thank you, its noted. firstly it would be more important to get make it behave like on all other browsers and servers. if the user decides to block by their own will is another story

                          girishG Offline
                          girishG Offline
                          girish
                          Staff
                          wrote on last edited by
                          #33

                          @squareclouds I replied now. But the site you sent me (which I think you said is hosted externally?) doesn't work either. It has the same errors. Sent you a screenshot.

                          S 1 Reply Last reply
                          0
                          • timconsidineT timconsidine

                            @squareclouds said in Cloudron+LAMP: Tiktok Embed problems:

                            thats why i am here. at some point I didnt know what to test anymore

                            After the extensive amount of discussion in this thread, if you haven't solved it and you still want help from the community, maybe you should share the URL of the site running on Cloudron.

                            Forum posts get indexed by search engines, so probably share a temporary alias which gets removed later.

                            Also I think I read you don't have the non-Cloudron site running. If that's correct, may I suggest you get one running again for the point of comparison, and of course share its URL (or rather an alias if needed).

                            Otherwise people trying to help are just guessing.

                            S Offline
                            S Offline
                            squareclouds
                            wrote on last edited by
                            #34

                            @timconsidine thats why @girish asked me already to send the link to the cloudron support email after i already posted it here and he removed it, since i said technically i am not allowed (signed non-disclosure agreement) to be showing it yet. so for now i will wait for his response and thank you all for your guesses.

                            1 Reply Last reply
                            0
                            • girishG girish

                              @squareclouds I replied now. But the site you sent me (which I think you said is hosted externally?) doesn't work either. It has the same errors. Sent you a screenshot.

                              S Offline
                              S Offline
                              squareclouds
                              wrote on last edited by
                              #35

                              @girish ah thank you, didnt see it while i was wirting. and sorry i misunderstood your request, i just sent you the other link.

                              1 Reply Last reply
                              1
                              • girishG Offline
                                girishG Offline
                                girish
                                Staff
                                wrote on last edited by
                                #36

                                Alright, found the problem. By default, we set the Referrer-Policy as same-origin (see also https://forum.cloudron.io/topic/4546/referrer-policy-header-is-overwritten) . On safari alone, having this header makes TikTok videos not play. Changing it to unsafe-url makes it work.

                                @squareclouds An app can change this header. In the LAMP app, edit the apache/app.conf . Add a line Header set Referrer-Policy "unsafe-url" and restart the app. That seems to make it work. Can you confirm?

                                See also:

                                • https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html#referrer-policy
                                • https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
                                S 1 Reply Last reply
                                1
                                • girishG Offline
                                  girishG Offline
                                  girish
                                  Staff
                                  wrote on last edited by
                                  #37

                                  I have to add that maybe strict-origin-when-cross-origin is a better value and maybe other values make it work as well. So, might be worth testing what works best for your site. Unfortunately, I lost access to the Mac by now.

                                  1 Reply Last reply
                                  2
                                  • girishG girish

                                    Alright, found the problem. By default, we set the Referrer-Policy as same-origin (see also https://forum.cloudron.io/topic/4546/referrer-policy-header-is-overwritten) . On safari alone, having this header makes TikTok videos not play. Changing it to unsafe-url makes it work.

                                    @squareclouds An app can change this header. In the LAMP app, edit the apache/app.conf . Add a line Header set Referrer-Policy "unsafe-url" and restart the app. That seems to make it work. Can you confirm?

                                    See also:

                                    • https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html#referrer-policy
                                    • https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
                                    S Offline
                                    S Offline
                                    squareclouds
                                    wrote on last edited by
                                    #38

                                    @girish said in Cloudron+LAMP: Tiktok Embed problems:

                                    Header set Referrer-Policy "unsafe-url"

                                    thank you! i am trying it right now from the web terminal but it says app.conf is not writeable.

                                    • i opened the app terminal
                                    • went to app/code/apache
                                    • opened the app.conf with nano
                                    • made the change
                                    • but i cannot save

                                    do i have to stop the app and use ssh?
                                    ca79c992-f5c6-4e2b-917d-6bd0e499c48c-Bildschirm­foto 2023-04-28 um 11.17.04.png

                                    Bildschirm­foto 2023-04-28 um 11.17.04.png

                                    girishG 1 Reply Last reply
                                    0
                                    • S squareclouds

                                      @girish said in Cloudron+LAMP: Tiktok Embed problems:

                                      Header set Referrer-Policy "unsafe-url"

                                      thank you! i am trying it right now from the web terminal but it says app.conf is not writeable.

                                      • i opened the app terminal
                                      • went to app/code/apache
                                      • opened the app.conf with nano
                                      • made the change
                                      • but i cannot save

                                      do i have to stop the app and use ssh?
                                      ca79c992-f5c6-4e2b-917d-6bd0e499c48c-Bildschirm­foto 2023-04-28 um 11.17.04.png

                                      Bildschirm­foto 2023-04-28 um 11.17.04.png

                                      girishG Offline
                                      girishG Offline
                                      girish
                                      Staff
                                      wrote on last edited by girish
                                      #39

                                      @squareclouds said in Cloudron+LAMP: Tiktok Embed problems:

                                      went to app/code/apache

                                      It's in /app/data/apache . You can use the Filemanager . Code is always readonly in Cloudron.

                                      S 1 Reply Last reply
                                      0
                                      • girishG girish

                                        @squareclouds said in Cloudron+LAMP: Tiktok Embed problems:

                                        went to app/code/apache

                                        It's in /app/data/apache . You can use the Filemanager . Code is always readonly in Cloudron.

                                        S Offline
                                        S Offline
                                        squareclouds
                                        wrote on last edited by squareclouds
                                        #40

                                        @girish it works with both values!!!! thank you so much for your help and patience, girish! 🙂 i will leave it as 'strict-origin-when-cross-origin'

                                        1 Reply Last reply
                                        1
                                        Reply
                                        • Reply as topic
                                        Log in to reply
                                        • Oldest to Newest
                                        • Newest to Oldest
                                        • Most Votes


                                        • Login

                                        • Don't have an account? Register

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • Bookmarks
                                        • Search