Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use HTTPS #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Media Player
============

![Preview](http://images.akamai.steamusercontent.com/ugc/403430334757512796/4EFCE2D358BCAF42389E36B62CB11E9849842E07/)
![Preview](https://images.akamai.steamusercontent.com/ugc/403430334757512796/4EFCE2D358BCAF42389E36B62CB11E9849842E07/)

Media Player is an addon for Garry's Mod which features several media streaming services able to be played synchronously in multiplayer.

Expand All @@ -11,4 +11,4 @@ Place the contents of this GitHub repository into a new addon folder within your

If you'd only like to use the addon and not modify the source code, you can subscribe to the item on Steam Workshop:

[![Steam Workshop](http://www.pixeltailgames.com/elevator/images/workshop_button.png)](http://steamcommunity.com/sharedfiles/filedetails/?id=546392647)
[![Steam Workshop](https://www.pixeltailgames.com/elevator/images/workshop_button.png)](https://steamcommunity.com/sharedfiles/filedetails/?id=546392647)
4 changes: 2 additions & 2 deletions addon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version" "1.0.0"
"author_name" "Samuel Maddock"
"author_email" "[email protected]"
"author_url" "http://samuelmaddock.com"
"info" "http://github.com/samuelmaddock/gm-mediaplayer"
"author_url" "https://samuelmaddock.com"
"info" "https://github.com/samuelmaddock/gm-mediaplayer"
"override" "0"
}
12 changes: 6 additions & 6 deletions html/app/request.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,43 +23,43 @@ <h1>Share media from one of the selected services</h1>
<div class="services">

<span class="media-service logo-youtube"
data-href="http://www.youtube.com/"
data-href="https://www.youtube.com/"
data-name="YouTube"
data-service="yt"
onclick="selectService(this);"
onmouseover="hoverService();">&nbsp;</span>

<span class="media-service subtext logo-twitch"
data-href="http://www.twitch.tv/"
data-href="https://www.twitch.tv/"
data-name="Twitch"
data-service="twv twl"
onclick="selectService(this);"
onmouseover="hoverService();">&nbsp;</span>

<span class="media-service subtext logo-shoutcast"
data-href="http://www.gmtower.org/apps/radio/"
data-href="https://www.gmtower.org/apps/radio/"
data-name="SHOUTcast"
data-service="shc"
onclick="selectService(this);"
onmouseover="hoverService();">SHOUTcast</span>

<span class="media-service subtext logo-soundcloud"
data-href="http://soundcloud.com/search"
data-href="https://soundcloud.com/search"
data-name="SoundCloud"
data-overlay="true"
data-service="sc"
onclick="selectService(this);"
onmouseover="hoverService();">&nbsp;</span>

<span class="media-service subtext logo-reddit"
data-href="http://www.reddit.com/r/videos/"
data-href="https://www.reddit.com/r/videos/"
data-name="/r/videos"
data-service="yt"
onclick="selectService(this);"
onmouseover="hoverService();">Videos</span>

<span class="media-service subtext logo-reddit"
data-href="http://www.reddit.com/r/fullmoviesonyoutube/"
data-href="https://www.reddit.com/r/fullmoviesonyoutube/"
data-name="/r/fullmoviesonyoutube"
data-service="yt"
onclick="selectService(this);"
Expand Down
2 changes: 1 addition & 1 deletion html/app/vimeo.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
var videoId = location.hash.substr(1);
if (!videoId.length) return;

var url = 'http://player.vimeo.com/video/',
var url = 'https://player.vimeo.com/video/',
params = '?api=1&player_id=player_1&autoplay=true';

console.info('Loading Vimeo player...');
Expand Down
2 changes: 1 addition & 1 deletion html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"repository": {
"type": "git",
"url": "http://github.com/pixeltailgames/gm-mediaplayer.git"
"url": "https://github.com/pixeltailgames/gm-mediaplayer.git"
},
"dependencies": {},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions lua/mediaplayer/config/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MediaPlayer.SetConfig({
-- Base URL where HTML content is located.
-- @type String
--
base_url = "http://samuelmaddock.github.io/gm-mediaplayer/"
base_url = "https://samuelmaddock.github.io/gm-mediaplayer/"

},

Expand All @@ -25,7 +25,7 @@ MediaPlayer.SetConfig({
-- URL of the request menu.
-- @type String
--
url = "http://samuelmaddock.github.io/gm-mediaplayer/request.html"
url = "https://samuelmaddock.github.io/gm-mediaplayer/request.html"

}

Expand Down
2 changes: 1 addition & 1 deletion lua/mediaplayer/controls/dhtmlcontrols.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function PANEL:Init()
self:SetButtonColor( Color( 250, 250, 250, 200 ) )
self.BorderSize = 4
self.BackgroundColor = Color( 33, 33, 33, 255 )
self:SetHomeURL( "http://www.google.com" )
self:SetHomeURL( "https://www.google.com" )

end

Expand Down
2 changes: 1 addition & 1 deletion lua/mediaplayer/services/audiofile/cl_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function SERVICE:SyncEntityPos()
self.Channel:SetPos( self.Entity:GetPos() )
else
-- TODO: Fake 3D volume
-- http://facepunch.com/showthread.php?t=1302124&p=41975238&viewfull=1#post41975238
-- https://facepunch.com/showthread.php?t=1302124&p=41975238&viewfull=1#post41975238

-- local volume = BaseClass.Volume( self, volume )
-- local vol = volume > 1 and volume/100 or volume
Expand Down
2 changes: 1 addition & 1 deletion lua/mediaplayer/services/googledrive/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local TableLookup = MediaPlayerUtils.TableLookup

-- TODO:
-- https://video.google.com/get_player?wmode=opaque&ps=docs&partnerid=30&docid=0B9Kudw3An4Hnci1VZ0pwcHhJc00&enablejsapi=1
-- http://stackoverflow.com/questions/17779197/google-drive-embed-no-iframe
-- https://stackoverflow.com/questions/17779197/google-drive-embed-no-iframe
-- https://developers.google.com/drive/v2/reference/files/get

local APIKey = MediaPlayer.GetConfigValue('google.api_key')
Expand Down
6 changes: 3 additions & 3 deletions lua/mediaplayer/services/soundcloud/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ local urllib = url

local ClientId = MediaPlayer.GetConfigValue('soundcloud.client_id')

-- http://developers.soundcloud.com/docs/api/reference
-- https://developers.soundcloud.com/docs/api/reference
local MetadataUrl = {
resolve = "http://api.soundcloud.com/resolve.json?url=%s&client_id=" .. ClientId,
resolve = "https://api.soundcloud.com/resolve.json?url=%s&client_id=" .. ClientId,
tracks = ""
}

Expand Down Expand Up @@ -36,7 +36,7 @@ local function OnReceiveMetadata( self, callback, body )
thumbnail = string.Replace( thumbnail, 'large', 't500x500' )
end

-- http://developers.soundcloud.com/docs/api/reference#tracks
-- https://developers.soundcloud.com/docs/api/reference#tracks
local metadata = {}
metadata.title = (resp.title or "[Unknown title]") .. " - " .. artist
metadata.duration = math.ceil(tonumber(resp.duration) / 1000) -- responds in ms
Expand Down
2 changes: 1 addition & 1 deletion lua/mediaplayer/services/twitch/cl_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include "shared.lua"

DEFINE_BASECLASS( "mp_service_browser" )

local TwitchUrl = "http://www.twitch.tv/%s/%s/%s/popout"
local TwitchUrl = "https://www.twitch.tv/%s/%s/%s/popout"

---
-- Approximate amount of time it takes for the Twitch video player to load upon
Expand Down
2 changes: 1 addition & 1 deletion lua/mediaplayer/services/twitchstream/cl_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local htmlBaseUrl = MediaPlayer.GetConfigValue('html.base_url')

DEFINE_BASECLASS( "mp_service_browser" )

local TwitchUrl = "http://www.twitch.tv/%s/popout"
local TwitchUrl = "https://www.twitch.tv/%s/popout"

local JS_Play = "if(window.MediaPlayer) MediaPlayer.play();"
local JS_Pause = "if(window.MediaPlayer) MediaPlayer.pause();"
Expand Down
2 changes: 1 addition & 1 deletion lua/mediaplayer/services/vimeo/init.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AddCSLuaFile "shared.lua"
include "shared.lua"

local MetadataUrl = "http://vimeo.com/api/v2/video/%s.json"
local MetadataUrl = "https://vimeo.com/api/v2/video/%s.json"

local function OnReceiveMetadata( self, callback, body )

Expand Down
2 changes: 1 addition & 1 deletion lua/mediaplayer/services/vimeo/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function SERVICE:GetVimeoVideoId()

local url = self.urlinfo

-- http://www.vimeo.com/(videoId)
-- https://www.vimeo.com/(videoId)
videoId = string.match(url.path, "^/(%d+)")

self.videoId = videoId
Expand Down
2 changes: 1 addition & 1 deletion lua/mediaplayer/services/youtube/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local TableLookup = MediaPlayerUtils.TableLookup
-- Helper function for converting ISO 8601 time strings; this is the formatting
-- used for duration specified in the YouTube v3 API.
--
-- http://stackoverflow.com/a/22149575/1490006
-- https://stackoverflow.com/a/22149575/1490006
--
local function convertISO8601Time( duration )
local a = {}
Expand Down
8 changes: 4 additions & 4 deletions lua/mediaplayer/services/youtube/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ function SERVICE:GetYouTubeVideoId()

local url = self.urlinfo

-- http://www.youtube.com/watch?v=(videoId)
-- https://www.youtube.com/watch?v=(videoId)
if url.query and url.query.v then
videoId = url.query.v

-- http://www.youtube.com/v/(videoId)
-- https://www.youtube.com/v/(videoId)
elseif url.path and string.match(url.path, "^/v/([%a%d-_]+)") then
videoId = string.match(url.path, "^/v/([%a%d-_]+)")

-- http://youtube.googleapis.com/v/(videoId)
-- https://youtube.googleapis.com/v/(videoId)
elseif url.path and string.match(url.path, "^/v/([%a%d-_]+)") then
videoId = string.match(url.path, "^/v/([%a%d-_]+)")

-- http://youtu.be/(videoId)
-- https://youtu.be/(videoId)
elseif string.match(url.host, "youtu.be") and
url.path and string.match(url.path, "^/([%a%d-_]+)$") and
( (not url.query) or #url.query == 0 ) then -- short url
Expand Down