-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OHMS-SPRINT-15 Aviary Video Content Support added.
- Loading branch information
Showing
7 changed files
with
2,414 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
namespace Ohms; | ||
|
||
use simple_html_dom; | ||
|
||
/** | ||
* Utils Class, Contains commonly used utility Methods. | ||
*/ | ||
class Utils { | ||
|
||
/** | ||
* Get Parsed URL for Aviary player in particular. | ||
* @param string $embed | ||
* @return string | ||
*/ | ||
public static function getAviaryUrl($embed) { | ||
|
||
// Create DOM from URL or file | ||
$content = file_get_html($embed); | ||
$mediaURL = ""; | ||
if ($content != "") { | ||
|
||
$source = $content->find('source', 0); | ||
if ($source) { | ||
|
||
if ($source->src) { | ||
$parsedUrl = parse_url($source->src); | ||
$mediaURL = $parsedUrl['scheme'] . "://" . $parsedUrl['host'] . "" . $parsedUrl['path']; | ||
} | ||
} | ||
} | ||
return $mediaURL; | ||
} | ||
|
||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?php | ||
require_once __DIR__ . '/../vendor/autoload.php'; | ||
require_once __DIR__ . '/../lib/tcpdf_include.php'; | ||
require_once __DIR__ . '/../lib/simple_html_dom.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1445,4 +1445,7 @@ p.bold { | |
.printCustom{ | ||
display:none; | ||
} | ||
} | ||
.adjust_height{ | ||
height: 620px !important ; | ||
} |
Oops, something went wrong.