test shows streaming video

This commit is contained in:
Mahri Ilmedova 2022-09-12 00:03:19 +05:00
parent 3675d89580
commit ab89f232aa
3 changed files with 12 additions and 2 deletions

View File

@ -12,6 +12,7 @@ use App\Models\Topheaderadv;
use App\Models\Material;
use Illuminate\Pagination\Paginator;
use App\Models\Order;
use App\Models\Show;
use App\Models\Webpage;
use Carbon\Carbon;
use Illuminate\Http\Request;
@ -391,4 +392,12 @@ class HomeController extends Controller
$tmp = new VideoStream($video_path);
$tmp->start();
}
public function showStream($id){
$show = Show::find($id);
$video_path = $show->video_url;
$tmp = new VideoStream($video_path);
$tmp->start();
}
}

View File

@ -11,7 +11,7 @@
text-shadow: 0.1em 0.1em 0.2em #006081a8 !important;
}
</style>
{{--
{{--
<div class="container-fluid" style="padding: 0">
<div class="container-fluid header-carousel">
<div class="row">
@ -61,7 +61,7 @@
<div class="video-player">
<video width="100%" poster="https://content.turkmentv.gov.tm/uploads/{{ $show->img_url }}" controls style="object-fit: cover;">
<source src="https://content.turkmentv.gov.tm/{{$show->video_url}}" type="video/mp4">
<source src="/stream/{{$show->id}}" type="video/mp4">
Your browser does not support HTML5 video.
</video>
</div>

View File

@ -6,6 +6,7 @@ Auth::routes();
Route::get('/', 'WebNewController@index')->name('homeWeb');
Route::get('/getShow/{id}', 'MenuLinkController@getShow')->name('getShow');
Route::get('/stream/{id}', 'HomeController@showStream')->name('streamShow');
Route::get('/groupShows/{id}', 'MenuLinkController@groupShows')->name('groupShows');
Route::get('/getGroupShow/{id}', 'MenuLinkController@getGroupShow')->name('getGroupShow');
Route::get('/getAllShow/{id}', 'MenuLinkController@getAllShow')->name('getAllShow');