feat: Add npm dependencies and update vendor paths
- Add package.json dependencies: jquery, jquery-ui, moment, daterangepicker, wavesurfer.js, air-datepicker - Create scripts/setup-vendor.js to copy npm packages to public/assets/vendor - Update view templates to use vendor paths instead of old /js/ or CDN URLs - Clean up legacy commented-out scripts in master layout
This commit is contained in:
1 parent
e070c9f374
commit
7b9674110e
8454 files changed
+11623
-27
No files matched your search
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if(!isset($MEDIAPLAYER_INCLUDED)):
|
||||
// Make sure mediaplayer JS is not applied more than once on a page.
|
||||
View::share('MEDIAPLAYER_INCLUDED', true);
|
||||
|
||||
function createVideoElement($url) {
|
||||
$type = "application/x-mpegurl";
|
||||
if(strpos($url, "youtube.com") !== false) { $type = "video/youtube"; }
|
||||
if(strpos($url, "youtu.be") !== false) { $type = "video/youtube"; }
|
||||
?>
|
||||
<video controls>
|
||||
<source src="{!!$url!!}" type="{!!$type!!}" />
|
||||
</video>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@push('scripts')
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mediaelement/5.0.5/mediaelement-and-player.min.js"></script>
|
||||
<script type="text/javascript" src="/js/mediaplayer_plugins.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var pluginPath = 'https://cdnjs.cloudflare.com/ajax/libs/mediaelement/5.0.5/';
|
||||
var features = ['playpause','skipback','jumpforward','current','progress','duration','volume','airplay','chromecast','fullscreen'];
|
||||
$("audio").mediaelementplayer({
|
||||
pluginPath: pluginPath,
|
||||
stretching: 'responsive',
|
||||
features: features,
|
||||
skipBackInterval: 15,
|
||||
jumpForwardInterval: 15,
|
||||
});
|
||||
$("video").mediaelementplayer({
|
||||
pluginPath: pluginPath,
|
||||
videoWidth: '100%',
|
||||
videoHeight: '100%',
|
||||
enableAutosize: true,
|
||||
features: features,
|
||||
skipBackInterval: 15,
|
||||
jumpForwardInterval: 15,
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@push('styles')
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.16/mediaelementplayer.css" />
|
||||
<link rel="stylesheet" href="/css/mediaplayer_plugins.min.css" />
|
||||
@endpush
|
||||
|
||||
<?php endif; ?>
|
||||
Reference in new issue
Block a user