Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge #153

Merged
merged 77 commits into from
Oct 17, 2024
Merged

Merge #153

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
17fbdd5
Change paella files to version 7
albacodina Jun 6, 2022
9fcfb36
[WA] Add files and directory structure
Yurujai Jun 13, 2022
7532b85
[WA] Build paella player
Yurujai Jun 14, 2022
b217a6d
[WA] Build paella player II
Yurujai Jun 16, 2022
e644991
[WA] Use php-cs-fixer
Yurujai Jun 17, 2022
9ecc434
[WA] Add services manifest creators
Yurujai Jun 20, 2022
5a311c7
TTK-25655 add paellarepository for lives. Fix manifest metadata related
Yurujai Jun 20, 2022
f8430cb
TTK-25911 fix dual-stream manifest
Yurujai Jun 21, 2022
1fff7f3
Remove unused dir and files
Yurujai Jun 21, 2022
52c8da1
TTK-25905, TTK-25903 fix load .svg images and change background color…
Yurujai Jun 21, 2022
eddad92
TTK-25907 Remove players borders
albacodina Jun 21, 2022
fb8bd4b
TTK-25905, TTK-25903 fix load .svg images and change background color…
Yurujai Jun 21, 2022
f70aabe
Update paella build
Yurujai Jun 21, 2022
7bc6453
Update CHANGELOG
Yurujai Jul 7, 2022
2322683
TTK-25655 use paella player as pumukit base player
Yurujai Jul 11, 2022
3728435
TTK-25655 use PHPCsFixer
Yurujai Jul 11, 2022
a4ec78d
Update dependencies of Paella player
Yurujai Aug 4, 2022
bfc1fb6
Add teltek-paella-plugins
Yurujai Sep 7, 2022
f126e3d
Update Teltek paella player
Yurujai Sep 7, 2022
bc830f1
Update config files
Yurujai Sep 7, 2022
1be357d
Update dynamic conf file
Yurujai Sep 7, 2022
37561d3
Add playlist feature
Yurujai Sep 7, 2022
45d3be3
Update paella-teltek-plugins
Yurujai Sep 8, 2022
b018d2b
Make dynamic configuration file for: live, vod and playlists
Yurujai Sep 8, 2022
eb83fc2
Update dist sources for teltek paella player
Yurujai Sep 8, 2022
cbaaa65
TTK-23444 Add paella-teltek-plugins last version and refactor code
Yurujai Nov 15, 2022
7da38cb
Remove PaellaDataService definition
Yurujai Nov 15, 2022
58444be
Remove annotationsManifest
Yurujai Nov 15, 2022
035bd32
Remove unnecessary comparision
Yurujai Nov 24, 2022
f361931
Fix rector validations
Yurujai Nov 24, 2022
1851407
Fix json_decode
Yurujai Nov 24, 2022
0f15154
Fix test
Yurujai Nov 24, 2022
6f85459
PHPCsFixer
Yurujai Feb 3, 2023
844976f
Fix indentation
Yurujai Feb 3, 2023
b8ca4e3
Feature paella update (#134)
Yurujai Feb 16, 2023
9b254b8
TTK-26452: Adapt the size of the player to the iframe (#135)
albacodina Jun 12, 2023
a4383c3
TTK-26457: Show buttons depending on whether there are subtitles (#136)
albacodina Jun 14, 2023
ca2fba0
Remove controls contextual menu with right click
Yurujai Jun 26, 2023
e94daf8
TTK-26489 remove pointer events on video:
Yurujai Jun 26, 2023
219ae1e
Update paella-teltek-plugins
Yurujai Jun 29, 2023
ca66a40
Update PaellaPlayer
Yurujai Jun 29, 2023
b54dcc7
Update PaellaPlayer II
Yurujai Jun 29, 2023
b2b840b
TTK-26496 add trimming manifest and update paella plugins
Yurujai Jun 29, 2023
c180970
TTK-26496 add trimming manifest and update paella plugins II
Yurujai Jun 29, 2023
60b59ea
Update paella-teltek-plugins 1.0.15
Yurujai Jun 29, 2023
c150f58
TTK-26507 add background for audios. Use new source type audio on Pae…
Yurujai Jul 10, 2023
6abb5c2
TTK-26498 fix styles for paella
Yurujai Jul 10, 2023
4e29ec0
TTK-26532, TTK-26531, TTK-26530 paella improvements on headers and tails
Yurujai Aug 8, 2023
e0af7b3
TTK-26543 create manifest with playable resources
Yurujai Aug 11, 2023
46a7d2e
TTK-26543 play only playable resources (#137)
Yurujai Aug 11, 2023
99df7d8
TTK-26547: Correct height in event player (#138)
albacodina Aug 23, 2023
c82e223
TTK-26547: Create hls url with external lives (#139)
albacodina Aug 29, 2023
a47d540
TTK-26547: show live correctly (#140)
albacodina Aug 31, 2023
f1db8bc
PHPCsFixer
Yurujai Aug 31, 2023
91e7dd7
Define
Yurujai Aug 31, 2023
6050758
TTK-26797: Show the player of the live channels (#141)
albacodina Jan 22, 2024
e381a68
TTK-26797: Fix php stan errors
albacodina Jan 22, 2024
03f2c78
TTK-26797: Fix php stan errors
albacodina Jan 22, 2024
1d5e318
TTK-26797: Fix php-cs-fixer errors
albacodina Jan 22, 2024
d4034f6
TTK-26815 use origin host to fix third party cookies changes
Yurujai Jan 24, 2024
77bb1e7
TTK-26842 add icons for dual-stream plugin
Yurujai Feb 6, 2024
3dda6c8
TTK-26842 add icons for dual-stream plugin II
Yurujai Feb 6, 2024
a11c573
TTK-26813 fix magic url
Yurujai Feb 6, 2024
e02080b
TTK-26799: Show videos of the event series at the end of the event (#…
albacodina Feb 20, 2024
7dfcc6e
TTK-26973: Change text color to subtitle finder (#144)
albacodina Apr 26, 2024
9fde603
TTK-26961: Import files depending on what is played in the player (#143)
albacodina Apr 26, 2024
8df8477
TTK-26970: Add shortcuts help plugin (#145)
albacodina Apr 29, 2024
accafdd
TTK-26989: Hide player buttons on mobile (#146)
albacodina May 9, 2024
91749a3
TTK-27023: Show events to users autopublisher (#147)
albacodina May 20, 2024
6606846
fix(27002): add series head or tail if multimedia object doesnt have
Yurujai May 21, 2024
077d6ec
fix: use method of service head&tail to get elements to play
Yurujai May 21, 2024
e49040a
fix: use method of service head&tail to get elements to play II
Yurujai May 21, 2024
49f2b75
TTK-27003: Update paella version to solve tail audio error (#149)
albacodina Jul 16, 2024
f6d33e5
TTK-27240: Adapt image to player (#151)
albacodina Sep 18, 2024
1daf30f
fix: accept dev-master as version of pumukit
Yurujai Oct 17, 2024
97482d6
fix: accept dev-master as version of pumukit
Yurujai Oct 17, 2024
89e45dc
Revert accept pumukit dev-master
Yurujai Oct 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.swp
\#*\#
.php-cs-fixer.cache
node_modules
3 changes: 3 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

declare(strict_types=1);

$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('var')
Expand Down
73 changes: 8 additions & 65 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,14 @@
# CHANGELOG

To get the diff for a specific change, go to https://github.com/teltek/PuMuKIT2-paella-player-bundle/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/teltek/PuMuKIT2-paella-player-bundle/compare/2.0.0...2.1.0-rc1
To get the diff for a specific change, go to https://github.com/teltek/PumukitPaellaPlayerBundle/commit/XXX where XXX is the change hash
To get the diff between two versions, go to https://github.com/teltek/PumukitPaellaPlayerBundle/compare/2.3.x...3.0.x

## [3.0.0](https://github.com/teltek/PumukitPaellaPlayerBundle/tree/3.0.x) - (Coming soon)

## [1.5.0][1.5.0] (2019-02-08)
- Raw mode for HTML5 base player enabled
- Created a new UX with audio controls improvements
- Segments now can be obtained from Pumukit's DB
- Bugfixing and performance improvements
#### Added
- Update Paella Player version to Paella 7 [More info](https://paellaplayer.upv.es/#/doc/paella_player_7_presentation.md)

## [1.4.0][1.4.0] (2018-10-10)
- Update paella to paella 5.3
- xAPI support
- Enabled MMO property to force custom paella layout
- Custom layouts for PR recordings added
- Added OCR plugin for Opencast videos
- Added Footprints plugin for Opencast videos
- Custom css URL added
- Configuration for accessControlClass added
- Bugfixing and performance improvements
Other changelog versions

## [1.2.4][1.2.4] (2017-10-19)
- Update paella to paella 5.2.4
- Add OCR plugin for Opencast videos
- Add Footprints plugin for Opencast videos

## [1.2.3][1.2.3] (2017-02-30)
- Update paella to paella 5.2.1

## [1.2.2][1.2.2] (2017-06-30)
- Update paella to paella 5.1.12
- Add a custom css url
- Force a paella layout from a object property

## [1.2.1][1.2.1] (2017-06-15)
- Update paella to paella 5.1.6
- Bug fixed

## [1.2.0][1.2.0] (2017-02-09)
- Update paella to paella 5.1-rc1
- Use PumukitCoreBundle filters.
- Add support for playlist.

## [1.0.4][1.0.4] (2016-05-28)
- Bug fixed with DFXP captions

## [1.0.3][1.0.3] (2016-05-18)
- Bug fixed with track resolution

## [1.0.2][1.0.2] (2016-04-28)
- Bug fixed with magic URLs and Opencast player

## [1.0.1][1.0.1] (2016-03-09)
- Bugs fixed with select a track

## 1.0.0 (2016-03-03)
- Initial version

[1.5.0]:https://github.com/teltek/PuMuKIT2-paella-player-bundle/compare/1.4.0...1.5.0
[1.4.0]:https://github.com/teltek/PuMuKIT2-paella-player-bundle/compare/1.2.0...1.4.0
[1.2.4]:https://github.com/teltek/PuMuKIT2-paella-player-bundle/compare/1.2.3...1.2.4
[1.2.3]:https://github.com/teltek/PuMuKIT2-paella-player-bundle/compare/1.2.2...1.2.3
[1.2.2]:https://github.com/teltek/PuMuKIT2-paella-player-bundle/compare/1.2.1...1.2.2
[1.2.1]:https://github.com/teltek/PuMuKIT2-paella-player-bundle/compare/1.2.0...1.2.1
[1.2.0]:https://github.com/teltek/PuMuKIT2-paella-player-bundle/compare/1.0.4...1.2.0
[1.0.4]:https://github.com/teltek/PuMuKIT2-paella-player-bundle/compare/1.0.3...1.0.4
[1.0.3]:https://github.com/teltek/PuMuKIT2-paella-player-bundle/compare/1.0.2...1.0.3
[1.0.2]:https://github.com/teltek/PuMuKIT2-paella-player-bundle/compare/1.0.1...1.0.2
[1.0.1]:https://github.com/teltek/PuMuKIT2-paella-player-bundle/compare/1.0.0...1.0.1
## Other changelog versions
Show old changelog version on [Paella Player 5](https://github.com/teltek/PumukitPaellaPlayerBundle/blob/2.3.x/CHANGELOG.md)
42 changes: 42 additions & 0 deletions Controller/BaseLivePlayerController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

declare(strict_types=1);

namespace Pumukit\PaellaPlayerBundle\Controller;

use Pumukit\SchemaBundle\Document\Live;
use Pumukit\SchemaBundle\Document\MultimediaObject;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;

class BaseLivePlayerController extends AbstractController
{
/**
* @Route("/livevideoplayer/{id}", name="pumukit_livevideoplayer_index")
*
* @Template("@PumukitPaellaPlayer/PaellaPlayer/player.html.twig")
*/
public function indexAction(Request $request, MultimediaObject $multimediaObject)
{
return [
'multimediaObject' => $multimediaObject,
'object' => $multimediaObject,
'event' => $multimediaObject->getEmbeddedEvent(),
];
}

/**
* @Route("/live/channel/videoplayer/{id}", name="pumukit_live_channel_videoplayer")
*
* @Template("@PumukitPaellaPlayer/PaellaPlayer/player.html.twig")
*/
public function fromLiveAction(Request $request, Live $live)
{
return [
'live' => $live,
'object' => $live,
];
}
}
18 changes: 13 additions & 5 deletions Controller/BasePlayerController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Pumukit\PaellaPlayerBundle\Controller;

use Pumukit\BasePlayerBundle\Controller\BasePlayerController as BasePlayerAbstractController;
Expand Down Expand Up @@ -48,6 +50,7 @@ public function __construct(
/**
* @Route("/videoplayer/{id}", name="pumukit_videoplayer_index")
* @Route("/videoplayer/opencast/{id}", name="pumukit_videoplayer_opencast")
*
* @Template("@PumukitPaellaPlayer/PaellaPlayer/player.html.twig")
*/
public function indexAction(Request $request, MultimediaObject $multimediaObject)
Expand All @@ -57,12 +60,21 @@ public function indexAction(Request $request, MultimediaObject $multimediaObject

/**
* @Route("/videoplayer/magic/{secret}", name="pumukit_videoplayer_magicindex")
*
* @Template("@PumukitPaellaPlayer/PaellaPlayer/player.html.twig")
*/
public function magicAction(Request $request, MultimediaObject $multimediaObject)
{
if (!$request->query->has('secret')) {
return $this->redirect($this->generateUrl('pumukit_videoplayer_magicindex', ['id' => $multimediaObject->getId(), 'secret' => $multimediaObject->getSecret()]).'&secret='.$multimediaObject->getSecret());
return $this->redirect(
$this->generateUrl(
'pumukit_videoplayer_magicindex',
[
'id' => $multimediaObject->getId(),
'secret' => $multimediaObject->getSecret(),
]
).'&secret='.$multimediaObject->getSecret()
);
}

return $this->doRender($request, $multimediaObject);
Expand All @@ -79,10 +91,6 @@ private function doRender(Request $request, MultimediaObject $multimediaObject)
return $track;
}

if ($request->query->has('raw')) {
return $this->generateBasePlayerRaw($request, $multimediaObject, $track);
}

$tracks = $this->getMultimediaObjectMultiStreamTracks($multimediaObject, $track);

return $this->getParametersForPlayer($request, $multimediaObject, $tracks);
Expand Down
5 changes: 4 additions & 1 deletion Controller/BasePlaylistController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Pumukit\PaellaPlayerBundle\Controller;

use Doctrine\ODM\MongoDB\DocumentManager;
Expand Down Expand Up @@ -50,6 +52,7 @@ public function indexAction(Request $request, Series $series)

/**
* @Route("/playlist", name="pumukit_playlistplayer_paellaindex", defaults={"no_channels": true} )
*
* @Template("@PumukitPaellaPlayer/PaellaPlayer/player.html.twig")
*/
public function paellaIndexAction(Request $request)
Expand All @@ -62,7 +65,7 @@ public function paellaIndexAction(Request $request)
}

if (!$mmobjId) {
//If the player has no mmobjId, we should provide it ourselves.
// If the player has no mmobjId, we should provide it ourselves.
return $this->redirectWithMmobj($series, $request);
}

Expand Down
76 changes: 57 additions & 19 deletions Controller/ConfController.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<?php

declare(strict_types=1);

namespace Pumukit\PaellaPlayerBundle\Controller;

use Doctrine\ODM\MongoDB\DocumentManager;
use MongoDB\BSON\ObjectId;
use Pumukit\SchemaBundle\Document\Live;
use Pumukit\SchemaBundle\Document\MultimediaObject;
use Pumukit\SchemaBundle\Services\CaptionService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Routing\Annotation\Route;

class ConfController extends AbstractController
Expand All @@ -22,15 +25,18 @@ class ConfController extends AbstractController
private $paellaXAPIAuth;
private $paellaAccessControlClass;
private $paellaFootPrints;
private $captionService;

public function __construct(
DocumentManager $documentManager,
CaptionService $captionService,
$paellaXAPIEndpoint,
$paellaXAPIAuth,
$paellaAccessControlClass,
$paellaFootPrints
) {
$this->documentManager = $documentManager;
$this->captionService = $captionService;
$this->paellaXAPIEndpoint = $paellaXAPIEndpoint;
$this->paellaXAPIAuth = $paellaXAPIAuth;
$this->paellaAccessControlClass = $paellaAccessControlClass;
Expand All @@ -40,34 +46,57 @@ public function __construct(
/**
* @Route("/paella/config.json", name="paella_player_config")
*/
public function confAction(Request $request)
public function confAction(Request $request): Response
{
$id = $request->get('id');
if (!$id || !preg_match('/^[0-9a-z]{24}$/', $id)) {
throw new NotFoundHttpException('Multimedia Object not found with id '.$id);
$multimediaObject = $this->getMultimediaObject($request->query->get('configID'));
$jsonData = '';

if ($multimediaObject instanceof MultimediaObject) {
$jsonData = $this->renderView(
'@PumukitPaellaPlayer/Conf/conf.json.twig',
[
'xapi_endpoint' => $this->paellaXAPIEndpoint,
'xapi_auth' => $this->paellaXAPIAuth,
'access_control_class' => $this->paellaAccessControlClass,
'footprints' => $this->paellaFootPrints,
'isMonostream' => !$multimediaObject->isMultistream(),
'isMultistream' => $multimediaObject->isMultistream(),
'isLive' => $multimediaObject->isLive(),
'notLive' => !$multimediaObject->isLive(),
'hasCaptions' => $this->captionService->hasCaptions($multimediaObject),
]
);

return new Response($jsonData, 200, ['Content-Type' => 'application/json']);
}

$folders_profiles = $this->getPaellaProfileFolder($request);
$live = $this->documentManager->getRepository(Live::class)->findOneBy([
'_id' => new ObjectId($request->query->get('configID')),
]);

$jsonData = $this->renderView(
'@PumukitPaellaPlayer/Conf/conf.json.twig',
[
'xapi_endpoint' => $this->paellaXAPIEndpoint,
'xapi_auth' => $this->paellaXAPIAuth,
'access_control_class' => $this->paellaAccessControlClass,
'footprints' => $this->paellaFootPrints,
'folders_profiles' => $folders_profiles,
]
);
if ($live instanceof Live) {
$jsonData = $this->renderView(
'@PumukitPaellaPlayer/Conf/conf.json.twig',
[
'xapi_endpoint' => $this->paellaXAPIEndpoint,
'xapi_auth' => $this->paellaXAPIAuth,
'access_control_class' => $this->paellaAccessControlClass,
'footprints' => $this->paellaFootPrints,
'isMonostream' => true,
'isMultistream' => false,
'isLive' => true,
'notLive' => false,
'hasCaptions' => false,
]
);
}

return new Response($jsonData, 200, ['Content-Type' => 'application/json']);
}

private function getPaellaProfileFolder(Request $request): string
{
$multimediaObject = $this->documentManager->getRepository(MultimediaObject::class)->findOneBy(
['_id' => new ObjectId($request->get('id'))]
);
$multimediaObject = $this->getMultimediaObject($request->get('id'));

if (strpos($request->headers->get('referer'), 'advanced')) {
return self::PAELLA_ADVANCE_CONFIG_FOLDER;
Expand All @@ -79,4 +108,13 @@ private function getPaellaProfileFolder(Request $request): string

return self::PAELLA_DEFAULT_CONFIG_FOLDER;
}

private function getMultimediaObject(string $objectId)
{
try {
return $this->documentManager->getRepository(MultimediaObject::class)->findOneBy(['_id' => new ObjectId($objectId)]);
} catch (\Exception $exception) {
return $this->documentManager->getRepository(MultimediaObject::class)->findOneBy(['secret' => $objectId]);
}
}
}
Loading
Loading