-
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.
To play videos, find the “Administrate” panel under the Options tab of the spawn/tool menu (default key: Q), under the PlayX group.
A provider is a video/media hosting service, such as YouTube or Vimeo, or it can be a file type, such as MP3 or FLV. When you want to play a video or piece of media, you can use PlayX’s auto-detect function which will attempt to guess the provider from the URI you provide. The URI is the text that identifies the piece of media. Often times, it will be a URL, but it can be something more specific such as the ID of a YouTube video.
Once you have selected a provider and entered a URI, you can click “Open Media” to start play. If there’s an error, it will be shown in your chat.
There are some options on that panel that you need to be aware of:
- “Start At” — This is the number of seconds to skip in the video. This does not work on all types of providers, but it will work on YouTube and Vimeo videos.
- “Use JW player when applicable” — Some types of media, such as YouTube videos, can optionally be played using the JW player. Unchecking this will disable the player (if there is an alternative, such as with YouTube). 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.)
- “Force low frame rate” — If you are playing a video just for its music, checking this box will force PlayX screens to play at 1 frame per second. Other players (and you) on the server won’t experience game slowness as a result of the player trying to update the screen often. 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 (this feature is disabled by default). 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.
- The “Enabled” checkbox enables or disables the player for you alone. If you disable the player, it will stay disabled after you restart Gmod.
- “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.
- “Volume” adjusts the volume of the player. Note that, unless you have gm_chrome installed, you have to click the “Re-initialize Player” button below to make this option take effect. 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 project object in your view. This only applies to projector-type screens.
-
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.


