-
Notifications
You must be signed in to change notification settings - Fork 1
Usage
Open your spawn menu (default key: Q), go to the Entities tab, and then click the icon for PlayX near the bottom. A dialog will appear, asking you to select a model.
The player should be in front of you somewhere, on the floor. If you can’t find it, hit your undo key (default key: Z), aim at the ground, and then try again.
PlayX 2 and above: If you spawned a projector, then the screen will be where you were looking at and the projector entity will be somewhere that makes that screen possible. If you are unable to find the projector, then hit your undo key (default key: Z), get closer to a wall, and then try again.
To play videos, find the “Administrate” panel under the Options tab of the spawn/tool menu (default key: Q), under the PlayX group.
Try it out: Put a YouTube video URL in the “URI” box, press your ENTER key, and then click the “Open Media” button. Don’t see anything? Check out the Troubleshooting page.
A provider is a source or type of media, like YouTube, Vimeo, MP3 or FLV. When you want to play something, you can use the “auto-detect” to guess the provider. For example, if you enter a YouTube URL into the URI box, it should guess YouTube.
- “Start At” — Number of seconds to skip in the video, but you can write the time as “m:ss” as well. Will really only work for YouTube and Vimeo videos.
- “Use JW player when applicable” — YouTube videos can optionally be played using the JW player. Unchecking this will disable the player. With YouTube videos, using the JW player means that you will not see advertisements, but the player does not show annotations and captions, and it may cut off a very short part of the video at the end. (After the last keyframe, to be technical.) Some providers will always use the JW player, regardless of this option.
- “Force low frame rate” — Force PlayX screens to play at 1 frame per second (great for music-only videos). For some providers/types of media, such as non-animated images and MP3s, low frame rate mode is automatically enabled, and this option has no effect.
- “Don’t auto stop on finish when applicable” — PlayX has a feature that stops the media once the media has ended. It works by querying for the length of the video and then setting a timer. It won’t account for buffering, so this feature is disabled by default. If the feature is enabled. checking this will disable it.
The Media Query extension allows you to search for YouTube videos right from chat. If you downloaded PlayX from GarrysMod.org, then it will automatically be installed. See the Media Query page to learn how to utilize these features.
- “Enabled” toggles PlayX on and off.
- “Use gm_chrome” uses gm_chrome, which providers superior performance. However, gm_chrome must first be installed.
- “Frame rate” adjusts the number of times that the screen “redraws” per second. Increasing the frame rate will cause the video to appear less laggy, but your game may start running slower. This does not apply if you use gm_chrome.
- “Volume” adjusts the volume of the player. Unless you have gm_chrome installed, you have to click the “Re-initialize Player” afterwards. If that button is grayed out, then you cannot change the volume for the current piece of playing media.
- “Hide Player” hides the current playing media. You may be able to resume the current playing media from the point where everyone else is, depending on the type of media.
- “Re-initialize player” appears when something is playing. This restarts the player, and it will resume from the point where you should be (ignoring buffering and lag).
- “Resume Player” resumes the media, after you had pressed “Hide Player.”
- “Fix Screen Not Always Appearing” fixes the problem when the screen won’t always appear unless you see the PlayX entity in your view. This only applies to projector-type screens.
Double-click a bookmark to play it. Right click on a bookmark to edit it or copy the URI/URL to your clipboard. To add bookmarks (and edit them), click the “Manage Bookmarks…” button at the very bottom.
To create a bookmark, enter / change the values in the textboxes and then press “Add.” To edit a bookmark, select a bookmark from the list, notice the changed values in the textbox (corresponding to the bookmark), change the values, and then click “Update.” You can also click the “Add” button to duplicate this bookmark, although you cannot have two bookmarks with the same title.
The “Reload” and “Save” buttons force a load and save of the bookmarks file. Every time you make an edit to your bookmarks, the changes are automatically saved, however.
Bookmarks can be assigned a single keyword. To use keywords, in the URI box on the “Administrate” panel, while using “auto-detect,” enter the keyword of the bookmark. Hit the “Open Media” button as usual.
PlayX’s bookmarks are saved in a regular CSV file that can be opened with Excel, OpenOffice Calc, or even Notepad. Once you have edited your bookmarks at least once (or hit the “Save” button in the bookmarks manager), the bookmarks file for PlayX will exist in your “garrysmod” folder at data/playx/bookmarks.txt.
The columns are, in this order:
1. Title (each bookmark needs to have a unique title)
2. Provider (may be blank for auto-detect)
3. URI
4. Keyword
5. Start At
6. Force low framerate (put 1 for true, or leave blank otherwise)
Be aware that some programs, namely Excel, may pester you to re-save the bookmarks file in a “more advanced” format. PlayX is only able to read CSV files, so continue to say “No” to these dialogs.
If you decide to edit the bookmarks file while playing Gmod, be sure to hit the “Reload” button in the bookmarks manager to reload the file. Don’t edit a bookmark in PlayX until you have done this, as this will overwrite your external changes.
Every time you join a game / start a single player game or use the “Reload” button in the bookmarks manager, PlayX will save a backup of the bookmarks file as bookmarks_backup.txt in the same folder as bookmarks.txt (see above). Should you manage to somehow royally screw over your bookmarks list while editing it, you can go to this folder and get the backup file to replace the bookmarks file. Remember to hit “Reload” to reload the bookmarks file.
The next time you hit “Reload” or join a game / start a single player game, the bookmarks backup file will be rewritten, so it is imperative that you fix your bookmarks immediately. Quitting Gmod will not rewrite the backup file, however.
The playx_wire_input cvar must be enabled (disabled by default) for Wiremod inputs to function.
To play a video, feed a URI and any other details as you would normally, and then set the “Open” input to a value of 1 or above. Note that Wiremod works by “triggering” inputs, not by keeping the state of inputs, so even if you last set Open to “1”, you can set Open to “1” again and it will work. To stop playing media, trigger “Close” with a value of 1 or above. You must wait to start another video again to as a measure against bad programming and abusive activities. This delay is governed by both the cvars playx_race_protection and playx_wire_input_delay, whichever is longer.
If an error occurs (if nothing happens), check the “InputError” output for an explanation. InputError is set to "" when either a Close or Open operation succeeds.
Be aware that the “Provider” input is case-sensitive, and the provider IDs in PlayX are not all lowercase. The YouTube provider is internally called “YouTube”, not “youtube”.
-
playx_jw_url(def. “http://playx.googlecode.com/svn/jwplayer/player.swf”)
This is the path to the copy of the JW player to use. By default, one is provided that links to a copy hosted on Google Code. A number of providers require that this setting is set. -
playx_jw_youtube(def. “1”)
Enable or disable where the JW player should be used for YouTube videos. If you are planning to host the JW player for yourself, then remember to host the “yt.swf” file in addition. Using the JW Player for YouTube will result in no ads, but also no annotations and no captions. You can disable use of the JW player client-side via a checkbox when starting a video. -
playx_admin_timeout(def. “120”)
This is the delay after all administrators have left the server before automatically stopping the playing media. This is defined in seconds. Use “0” to disable this feature. -
playx_expire(def. “-1”)
This is the number of seconds after a video is “supposed” to end (based on adding length + the time the video officially started) before PlayX automatically stops the video. Using this means that the video will be stopped so that clients won’t have a player that isn’t playing anything but is dropping frame rate. However, in practice, users have buffering and lag problems, so there should be a grace period, but the grace period would have to be quite long, defeating the purpose of this function. It is disabled by default. Use “-1” to disable. -
playx_race_protection(def. “1”)
Number of seconds that users must wait before starting another video. This is to prevent two or more users unintentionally starting a video at the same instant. Set to “0” or less to disable. -
playx_wire_input(def. “1”)
Allow Wiremod inputs to control the player. -
playx_wire_input_delay(def. “2”)
Number of seconds that users must wait before starting another video via the Wiremod inputs. Note that videos started via the PlayX panel will be counted in this counter. Set to “0” or less to disable.




