diff options
Diffstat (limited to 'model')
-rw-r--r-- | model/Room.php | 5 | ||||
-rw-r--r-- | model/Stream.php | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/model/Room.php b/model/Room.php index 33beb9f..b3804f1 100644 --- a/model/Room.php +++ b/model/Room.php @@ -128,6 +128,11 @@ class Room extends ModelBase } + public function hasEmbed() { + return $this->get('ROOMS.'.$this->getSlug().'.EMBED') && $this->get('EMBED'); + } + + public function hasSdVideo() { return $this->get('ROOMS.'.$this->getSlug().'.SD_VIDEO'); } diff --git a/model/Stream.php b/model/Stream.php index 0d96a02..fe333ce 100644 --- a/model/Stream.php +++ b/model/Stream.php @@ -99,6 +99,16 @@ class Stream return $display; } + public function getEmbedUrl() + { + return + forceslash(baseurl()). + 'embed/'. + rawurlencode($this->getRoom()->getSlug()).'/'. + rawurlencode($this->getSelection()).'/'. + rawurlencode($this->getLanguage()).'/'; + } + public function getVideoUrl($proto) { switch($proto) |