RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Playing RetroPie games in a browser

    Scheduled Pinned Locked Moved General Discussion and Gaming
    browserraspberry piuv4lstreaming
    24 Posts 14 Posters 12.6k Views
    Loading More Posts
    • 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.
    • L
      lproj
      last edited by

      There are also other examples for screen+audio mirroring in the opposite direction (PC->Rpi) if you are interested. For example, you play a game on a PC and the screen is mirrored to the Rpi display with ~no latency probably (depending on the resolution).

      thelostsoulT 1 Reply Last reply Reply Quote 0
      • QuackwalksQ
        Quackwalks
        last edited by Quackwalks

        I'm wondering if this only works between one network or if a friend across the country could play the retropie at my home.

        L 1 Reply Last reply Reply Quote 0
        • thelostsoulT
          thelostsoul @lproj
          last edited by

          @lproj You mean Steam Link probably. I never tried it out on RPi, but a quick test on my phone worked. But that works only if you are on same network.

          πŸ“œ RE/SET: 100 SNES Games for your RetroPie, 🎁 Share your hidden gems and insider tips

          L 1 Reply Last reply Reply Quote 0
          • L
            lproj @Quackwalks
            last edited by

            @Quackwalks the software (UV4L) is based on standard web technology for realtime bidirectional streaming of audio/video/data between peers in any network including internet.

            I had no problems with playing games in a LAN in various resolutions. In the posted demo the Rpi was on a wired network to my old router, while the PC was on WiFi, and the USB controller was attached to the Rpi directly because I was too lazy to configure RetroPie to work with the keyboard so that it could be controlled through the browser. In any case, the web application can certainly be extended to capture any gamepad connected to the PC (thorugh the JS gamepad API) other than browser keystrokes.

            It's worth to try this over the internet p2p to see how well it works, e.g. by exposing your Rpi to the internet or by configuring NAT traversal by specifiying a public TURN server for relaying the media/data streams.

            More interestingly, apart from the above direct peer-to-peer way, UV4L supports Janus web videorooms "in the cloud". In other words, the scenario would be the following: the Rpi in the LAN streams RetroPie to a public videoroom where one ore more participants (e.g. observers or active players) with their browsers could watch or even play the game by sending their keyboard events back to the Rpi. What is missing from this scenario to work out-of-the-box at the moment is that the Janus videoroom web interface provided by default should have to be slightly patched to capture and send the keystrokes. If there is enough interest in this, we might put some efforts in developing or giving hints to develop the missing piece (but, again, it's Javascript, so potentially every JS dev. could do that).

            1 Reply Last reply Reply Quote 0
            • L
              lproj @thelostsoul
              last edited by

              @thelostsoul no, I was still talking about UV4L (the same software pointed out in the initial post). It also allows to mirror the whole PC desktop (video + audio) with imperceptible latency from the browser to the Rpi (as opposite to the Rpi->PC demo). Again, it's everything based on standard web technology so there is no need to install any special software on the PC (i.e. the browser is enough). However, I admit I do not exactly know if pure mirroring is the same as what SteamLink does, or if it does more things, e.g. where is the gamepad controller attached to when using SteamLink, is it attached to the Rpi or to the PC?

              thelostsoulT 1 Reply Last reply Reply Quote 0
              • thelostsoulT
                thelostsoul @lproj
                last edited by

                @lproj Oh okay then, I don't want hijack this thread. But to answer your question, in Steam Link app, you connect the gamepad to the smartphone. It works suprisingly good, have no apparent lag and have full support for all gamepads and mouse which Steam supports, but it is not over the internet.

                Although I am not super interested in streaming for now, this is still an interesting alternative project.

                πŸ“œ RE/SET: 100 SNES Games for your RetroPie, 🎁 Share your hidden gems and insider tips

                1 Reply Last reply Reply Quote 0
                • L
                  lproj
                  last edited by lproj

                  would anybody be interested in playing retropie games in the PC/Android browser (plugin-free) as shown above, by only using your voice and/or gestures to control the player instead of/together with the gamepad controller?

                  herb_fargusH 1 Reply Last reply Reply Quote 0
                  • herb_fargusH
                    herb_fargus administrators @lproj
                    last edited by

                    @lproj would be an interesting proof of concept. Would be even more interesting with games like duck hunt

                    If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

                    Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

                    1 Reply Last reply Reply Quote 0
                    • L
                      lproj
                      last edited by

                      This is another demo. The game (Super Mario) is played from an Android Smartphone this time (in Chrome to be specific, no plug-in required) with a wireless GameSir controller attached to it. As usual the game runs on an headless Raspberry Pi 3B+ (with no display, no speakers, no gamepad connected). (To be honest, for demo purposes a display was also connected to the Raspberry Pi, but it was not necessary.) Easy-to-follow Instructions to try the same will be provided soon.

                      1 Reply Last reply Reply Quote 0
                      • L
                        lproj
                        last edited by

                        Quick installation instructions:

                        https://www.linux-projects.org/uv4l/tutorials/play-retropie-in-browser/

                        herb_fargusH 1 Reply Last reply Reply Quote 0
                        • herb_fargusH
                          herb_fargus administrators @lproj
                          last edited by

                          @lproj neat, once the dust settles with my move I'll have to dig my pi out and give it a go

                          If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

                          Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

                          1 Reply Last reply Reply Quote 0
                          • b3kB
                            b3k
                            last edited by

                            I followed the tutorial and it worked well for me.
                            For those interested in trying, just know that you do need to configure your client keyboard/gamepad in emulationstation so you should be where you can do that on your first try. Maybe that's obvious, but I did my install remotely and then couldn't interact with the RPi.

                            Is there a way to use a software keyboard/gamepad with it?

                            L 1 Reply Last reply Reply Quote 0
                            • L
                              lproj @b3k
                              last edited by lproj

                              @b3k if you know a bit of javascript programming, it should be easy to implement it in the webapp. I originally thought of a virtual gamepad to be placed on the top of the page for those who do not have a real controller but have a touchscreen, however I ended up with supporting real controllers in the browser. In any case the principle in the webapp is the same: each event (button up,down,left,right..) is mapped to the corresponding code which is sent to the rpi (where there exists a virtual gamepad interpreting the received code and "actuating" the corresponding event). The webapp source code can be found here:
                              https://github.com/lproj/screen-sharing-app

                              1 Reply Last reply Reply Quote 0
                              • T
                                TappedOut
                                last edited by

                                How would you go about restricting the server's virtual keyboard to only pass through certain keys regardless of what keys the browser sends?

                                1 Reply Last reply Reply Quote 0
                                • N
                                  navyseai
                                  last edited by navyseai

                                  I didn't want to be very picky but i feel i must... how is this different from using a teamviewer or other remote app? Is it optimised? This may be interesting to me if it works with no lag. but we are transmitting video, right?

                                  Yea we cant do it with a psx game but we could do it with these smaller roms.
                                  Personally, i'd rather to have a browser plugin (trusted :D)

                                  ClydeC 1 Reply Last reply Reply Quote 0
                                  • ClydeC
                                    Clyde @navyseai
                                    last edited by

                                    @navyseai said in Playing RetroPie games in a browser:

                                    I didn't want to be very picky but i feel i must... how is this different from using a teamviewer or other remote app?

                                    It's highly platform independent this way.

                                    Personally, i'd rather to have a browser plugin (trusted :D)

                                    Why add (usually third-party) code to a browser if it can get the job done without one? More code means more complexity and thus, more risk of instability, incompatibility and vulnerability.

                                    The link β€žinstructionsβ€œ in the opening post lists many advantages of this approach, like clientlessness, independence, security, standardisation etc.

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      Stephen88
                                      last edited by

                                      Hi guys, sorry for reopen this old topic, but this project still work with a raspberry pi 4 on raspbian buster?
                                      I'm very interested to use on my raspi dedicated to light Nas, for play retrogames sometimes.

                                      1 Reply Last reply Reply Quote 0
                                      • B
                                        bogglemind
                                        last edited by

                                        I'm also interested in this. I already followed every step, but when I click play on my browser it just stays loading for ever.

                                        1 Reply Last reply Reply Quote 0
                                        • T
                                          Trekinfo
                                          last edited by

                                          Yes it works on Raspberry Pi 4.
                                          Use the Stretch Repo, it will function in Buster.

                                          I connected the Raspi with 100 MBit on Local Network and it worked like Charm on 1080p.
                                          The only Issue ist, that i cant get the Mouse working. Does anybody knows what to do to caputure the Mouse Input?

                                          1 Reply Last reply Reply Quote 0
                                          • D
                                            diuk
                                            last edited by

                                            Hi, can anyone confirm if mouse input works? im interested on running point and click adventures with scummvm

                                            windgW 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.