Altspace / altvr.app Creator SDK snippet Free

Fire-V-Player

A YouTube player for your Altspace world that everyone watches together, in sync. Build a shared playlist, vote on what plays next, or switch to karaoke mode with a singer queue. Adding it takes a few minutes and no coding.

1. Pick a way 2a. Unity 2b. Website 3. Preview script 4. Settings 5. Using it in world Help, it's not working
← Back to FireR.at

1. Pick how you build your world

Fire-V-Player is a snippet: a ready-made piece you drop into your world. Its name (the "slug") is always:

Type it exactly like that: all lowercase, with the two dashes. Then pick the way you build your world and follow only that part of this page.

Recommended

I build my world in Unity

You use the Altspace / Banter Creator SDK in Unity. You get the settings in the Inspector and can drag the screen around in the Scene view.

Go to the Unity steps
No Unity needed

I edit my world on the website

You edit your world on altvr.app in your browser. You copy the snippet from the Snippets section and paste it into your world's HTML.

Go to the website steps

Only one Fire-V-Player per world. If you add it twice, only the first one works. If it looks like it didn't work, don't add another one: check Help, it's not working first.

2a. Add it in Unity

You need a Unity project with the Altspace / Banter Creator SDK already set up, and your world's scene open.

  1. Make an empty object. In the top menu choose GameObject › Create Empty. Rename it to Fire-V-Player so you can find it later (the name of the object doesn't matter, only the slug does).
  2. Put it at the middle of the world. With the new object selected, look at Transform in the Inspector and set Position to 0 0 0 and Rotation to 0 0 0. Why: you don't move the player by moving this object. You move it with the snippet's own settings (step 6). If the object isn't at 0 0 0, the outlines in the Scene view won't line up with where the screen really appears.
  3. Add the Snippet component. Click Add Component, type Snippet in the search box, and pick BS › Snippet.
  4. Type the slug and press Enter. In the Snippet's Slug box type and press Enter (the box only takes it after Enter or clicking somewhere else). It downloads the player and adds it to your world's Assets/WebRoot/index.html for you. After a moment the Inspector shows the title Fire-V-Player and a list of settings. If nothing happens, click Refresh from server.
  5. Save the scene. Press Ctrl + S (Windows / Linux) or Cmd + S (Mac). Do this every time you add or remove a snippet. Closing Unity without saving is the main way extra copies of the snippet end up in index.html.
  6. Place the screen. Change the settings in the Inspector, or drag the handles in the Scene view to move the screen, the buttons and the playlist panel. See Settings for what each one does.
  7. (Strongly recommended) Install the preview script so you can see the real size and angle of everything while you place it. It takes one minute: Preview script steps.
  8. Upload your world the same way you always do, then join it and press Playlist under the screen.

Without the preview script you only see the SDK's plain blue boxes. They show where things go but not their real size or angle. That's normal, not a bug. The preview script adds the orange outlines that match what you'll see in the world.

2b. Add it on the website

  1. Open your world for editing on altvr.app and go to the Snippets section.
  2. Find Fire-V-Player. Set the list to show All snippets, then search for Fire-V-Player (or scroll to it) and open it.
  3. Copy it. Click Copy & open index.html. This copies the snippet's code and opens your world's HTML.
  4. Paste it in the right place. If your HTML has these two lines, paste between them:
    <!-- snippet section -->
       paste here
    <!-- end snippet section -->
    If it doesn't have them, paste it just before </body>. Paste it once: check there isn't already a <bs-snippet name="fire-v-player" in there.
  5. Change the settings by editing the values in quotes in the pasted code, for example volume="10" to volume="30". See Settings.
  6. Save, then join your world and press Playlist under the screen.

Keep the code tidy. Every value needs quotes around it (volume="30", not volume=30), and a & in a link must be written as &amp;. Unity reads this part strictly, and one mistake can break the whole snippet section.

3. The Unity preview script (optional, Unity only)

A small helper file for the Unity editor. While the Fire-V-Player object is selected, it draws exactly where the player will put things, at their real size and angle, and updates the moment you change a setting:

  • Orange: the screen, the row of buttons and the playlist panel.
  • Pink: the Singers button (karaoke mode only).

It only runs inside the Unity editor. It never goes into your uploaded world and does nothing for visitors.

Install it

  1. Download the file with the button above. It's called FireVPlayerSnippetPreview.cs. Windows: make sure it didn't get saved as FireVPlayerSnippetPreview.cs.txt. Windows hides the end of file names by default; in File Explorer turn on View › Show › File name extensions to check. If it ends in .txt, rename it to end in .cs.
  2. Make a folder called Editor. In Unity's Project window, right-click the Assets folder and choose Create › Folder. Name it exactly Editor: capital E, no spaces, nothing else. If you already have an Assets/Editor folder, just use that one.
  3. Drag the file into that Editor folder from your Downloads folder (File Explorer on Windows, Finder on Mac). It must end up at Assets/Editor/FireVPlayerSnippetPreview.cs. In any other folder Unity can't build it and shows red errors.
  4. Wait for Unity to finish loading (the spinner in the bottom-right corner stops).
  5. Click your Fire-V-Player object in the Hierarchy. The orange outlines appear in the Scene view.

Updating it? Replace the old file, don't add a second one. Two copies of this script anywhere in your project (even in different folders) stop Unity building any of your scripts. Search the Project window for FireVPlayerSnippetPreview to make sure there's only one.

4. The settings you'll actually use

In Unity these are in the Snippet's Inspector. On the website they're the values in quotes in the pasted code. You can leave everything else as it is.

SettingWhat it doesExample
karaokeTick it (true) for karaoke mode: people join a queue and take turns singing. Leave it unticked for a normal shared playlist.false
playlistA YouTube playlist to start with when the room is empty. Paste the part after list= in a YouTube playlist link.PLZWiw-xxQ4...
roomWorlds with the same room share the same player and playlist. Leave it empty and each world gets its own.my-bar
volumeStarting volume, 0 to 100. Everyone can change their own volume in world.10
hand-controlsPuts small buttons on your left wrist in VR (mute, volume, skip, Playlist).true
positionWhere the screen is (x y z, in metres). Easiest to set by dragging its handle in the Scene view.0 1.5 2
rotationWhich way the screen faces (in degrees). 0 180 0 turns it around.0 0 0
scaleSize of the screen. 2 is 2 m wide; 4 is 4 m wide.2
button-positionWhere the row of buttons goes. Has its own drag handle.0 0.83 2
playlist-panel-positionWhere the playlist panel goes. Has its own drag handle. Empty puts it beside the screen.-1.8 1.5 1.85
controls-follow-screenTick it and the buttons and panel move and turn with the screen. Their drag handles then won't show where they really go, so use the preview script.false
spatialSound gets quieter as you walk away from the screen.true
untrusted-linksAlso allow video files, streams and VDO.Ninja links from any site. Off by default because those aren't moderated.false

Every other setting is explained in the full settings list on GitHub.

5. Using it in your world

The buttons under the screen

From left to right:

Playlist(Singers in karaoke) Skip backyour screen only Skip forwardyour screen only Muteyou only Volume downyou only Volume upyou only

The playlist panel

  • Press Playlist to open the panel next to the screen.
  • Use Search to find a YouTube video, then add it to the playlist or play it. You can also paste a YouTube, Twitch or Vimeo link into the search box.
  • In VR, grab the bar under the panel to carry it somewhere else. Pressing Playlist by the screen puts it back.
  • More... has the host controls and your own player settings (captions, picture sharpness, auto sync).

Who's in charge (the host)

  • The host controls what plays for everyone. If you can't skip or change the video, someone else is the host.
  • To become the host, open More... and press Take Over. The host can Lock the player so nobody else can take over, and can turn on Voting so people vote on what plays next.

Karaoke mode

  • Whoever runs the karaoke should press Take Over first.
  • Singers press Singers, search for a song and press Sing It to join the queue.
  • The host starts each singer with Play & Sing, and can move people up or down or remove them.

World owners and moderators can switch between playlist and karaoke without re-uploading: Playlist › More... › Mode at the bottom. It switches for everyone and goes back to your snippet's setting after a day with no changes.

Help, it's not working

Click a problem to see the fix.

I only see blue boxes in Unity, not the orange preview
  • Blue boxes are normal on their own: they come from the SDK. The orange preview only appears once the preview script is installed.
  • Check the file is at exactly Assets/Editor/FireVPlayerSnippetPreview.cs: folder named Editor, file ending in .cs (not .cs.txt).
  • Click the Fire-V-Player object in the Hierarchy: the preview only shows while it's selected.
  • Make sure the Scene view's Gizmos button (top right of the Scene view) is turned on.
  • Open Window › General › Console. Any red errors there stop the preview; see the next two problems.
  • Got an old copy? Download it again; older versions only worked if the slug was typed in lowercase.
Red errors in the Console mentioning "BS.SDKEditor", "UnityEditor" or "Handles"

The preview script is in the wrong folder. Move it into a folder named exactly Editor (for example Assets/Editor/). If it's already there, make sure the Creator SDK is installed in this project.

Red error: "already contains a definition for FireVPlayerSnippetPreview"

You have two copies of the preview script. Search the Project window for FireVPlayerSnippetPreview and delete every copy except the one in Assets/Editor.

The snippet shows up several times in index.html

Each copy comes from a Snippet component the SDK lost track of, usually after closing Unity without saving, or after adding the snippet again because it looked like it hadn't worked. Only the first copy is used, but the extras are confusing. To clean up:

  1. Make sure your scene has only one object with the Fire-V-Player Snippet. Delete any extra ones.
  2. In the top menu open Creator SDK › Setup › Tools, then Recover orphaned snippets and press Remove for the leftovers. (This tool needs Creator SDK 4.0.24 or newer. Older SDK: click Open index.html on the Snippet and delete the extra <bs-snippet name="fire-v-player" ... </bs-snippet> blocks by hand.)
  3. Save the scene (Ctrl/Cmd + S).

With the preview script installed, Unity's Console warns you when there's more than one copy, and the unused one is labelled NOT USED.

The Snippet shows no settings after I typed the slug
  • Press Enter after typing, or click Refresh from server.
  • Check the spelling: fire-v-player, with two dashes and no spaces.
  • Check you're online: the settings are downloaded.
There's no screen when I join my world
  • Did you upload the world again after adding the snippet?
  • Look where position says the screen is: it might be behind you, under the floor or inside a wall. Try 0 1.5 2 to put it near the middle of the world.
  • If you edited the code by hand, check every value has quotes around it.
I can't skip, pause or change the video

Someone else is the host. Open Playlist › More... and press Take Over. If it says the player is locked, the host has to unlock it first.

A video won't play

Some YouTube videos block being played on other sites, or aren't available in some countries. The panel suggests a replacement when it can; otherwise pick a different upload of the same video.

Still stuck? Get in touch or open an issue on GitHub. If it's a Unity problem, include a screenshot of the Snippet's Inspector and any red errors from the Console.