Giter Club home page Giter Club logo

media-player's Introduction

laravel-admin Media player

This extension allows you to play video or audio on grid pages and show pages with the help of mediaelement.

中文介绍

Screenshots

wx20181114-010912

wx20181114-011037

Installation

composer require laravel-admin-ext/media-player

php artisan vendor:publish --tag=laravel-admin-media-player

Usage

If you have a field foo that stores the full url of the audio/video file, or the path under the disk configured by admin.upload.disk, you can use it in the following way.

In the grid page:

// Add a play button to the current field column. After clicking it will open a modal to play the video file.
$grid->foo()->video();

// Add an audio player to the current field column
$grid->foo()->audio();

In show page:

// This field will be displayed as a video player
$show->foo()->video();

// this field will be displayed as an audio player
$show->foo()->audio();

If the field foo is another path or a file path under another server, you can use the following settings.

$grid->foo()->video(['server' => 'http:www.foo.com/']);

This player feature of this extension is based on mediaelement and can be referenced API and Configuration Add more settings to the player.

For example, set the size of the player:

$grid->foo()->video(['videoWidth' => 720, 'videoHeight' => 480]);

Donate

If you feel that this project has saved you time, you may wish to support it ;)

-1

License

Licensed under The MIT License (MIT).

media-player's People

Contributors

z-song avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

media-player's Issues

视频页面全部加载不出来

本地mac 是可以正常加载和播放。传递到centos上只要调用 ->video()就整个页面无显示,也没报错。mediaelement-and-player.min.js这个也没引入到,手动引入也不行。

laravel implementation

I was wondering how I can populate a grid with videos inside a user login. I am using laravel and am using a jscript video player since even this player has the problem that all a suer has to do is click download to get the file. I am tryign to restrict this behavior. So I am trying to do this with flowplayer. But I don't understand how to make the <script part of the player that is required to intitate the player.

Looking at your code it kind of made sense but didn't know if you have ever addressed this issue.

Thanks

video设置宽高样式不起作用,该怎么解决?

$show->field('dispute_voice', __('Dispute voice'))->audio();
$show->field('dispute_video', __('Dispute video'))->video(['videoWidth' => 300, 'videoHeight' => 300]);

默认 怎么是 width 960 height 540
width: 960px;
height: 540px;

The .mov format video could not be play

The version information is as follows:

"laravel-admin-ext/media-player": "^1.0"

My controller code like this:

$show->video_url('video')->video();

The generate code like this:

<video src="http://example.com/storage/example.mov" width="960px" height="540px" id="mejs_4532935149959674_from_mejs" preload="none"></video>

console not any error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.