edusoho企培系列版本更新日志:新增功能和优化历史
倍数播放功能、视频分类、支持m3u8视频加密
\plugins\AliVideoPlugin\DependencyInjection\Configuration.php
<?php
namespace AliVideoPlugin\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
class Configuration implements ConfigurationInterface
{public function getConfigTreeBuilder(){$rootNode = $treeBuilder->root('ali_video');return $treeBuilder;}
}
\plugins\AliVideoPlugin\DependencyInjection\AliVideoPluginExtension.php
<?php
namespace AliVideoPlugin\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;
class AliVideoPluginExtension extends Extension
{public function load(array $configs, ContainerBuilder $container){$configuration = new Configuration();$config = $this->processConfiguration($configuration, $configs);$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));$loader->load('services.yml');}
}
1、填写好您自己的阿里云视频点播参数信息
2、选择视频板块
3、上传视频有2种方式: 第一种就是直接在网站后台上传您的视频,视频会自动同步到阿里云,在阿里云控制台可以看到跟刚刚上传好的视频与及在自动转码;
4、第二种上传方式就是 直接去阿里云控制台上传(可以批量上传),上传好了在网站的后台视频列表这里可以同步看到
5、播放效果的展示、可以看到打卡的速度是非常的快的,不会像本地视频那种加载半天都不出来的情况
\plugins\AliVideoPlugin\Controller\FileChooserController.php
<?php
namespace AliVideoPlugin\Controller;
use AliVideoPlugin\Component\MediaParser\ParserProxy;
use AppBundle\Controller\FileChooserController as BaseController;
use Symfony\Component\HttpFoundation\Request;
/*** Class MediaProccessController* 用来处理活动中文件选取(上传,从资料库选择,从课程文件选择,导入网络文件)逻辑.*/
class FileChooserController extends BaseController
{public function importAction(Request $request, $courseId){$url = $request->query->get('url');$proxy = new ParserProxy();$item = $proxy->parseItem($url);return $this->createJsonResponse($item);}
}
企业级视频托管服务