Repository: openfun/marsha

Issue:
Remove dash usage
## Feature Request

**Is your feature request related to a problem or unsupported use case? Please describe.**

We have installed `hlsjs` lib to display medialive stream, we only have a hls manifest for this feature. We can remove all usage of dash, remove also `dashjs` and all computing in AWS to generate dash chunks and manifest (also save :dollar: and :bear: )

**Describe the solution you'd like**

- remove `dashjs` lib and its usage
- configure `hlsjs` everywhere
- remove `dash` usage in mediaconvert
- remove all references to a dash manifest.




Discussion:
After reading this documentation, this is maybe not a good idea : https://docs.aws.amazon.com/mediaconvert/latest/ug/choosing-your-streaming-output-groups.html

Resolving patch:
diff --git a/src/backend/marsha/core/serializers.py b/src/backend/marsha/core/serializers.py
--- a/src/backend/marsha/core/serializers.py
+++ b/src/backend/marsha/core/serializers.py
@@ -464,7 +464,6 @@ def get_urls(self, obj):
             A dictionary of all urls for:
                 - mp4 encodings of the video in each resolution
                 - jpeg thumbnails of the video in each resolution
-                - manifest of the DASH encodings of the video
                 - manifest of the HLS encodings of the video
             For a video in live mode only the HLS url is added
             None if the video is still not uploaded to S3 with success
@@ -475,7 +474,6 @@ def get_urls(self, obj):
             return {
                 "manifests": {
                     "hls": obj.live_info["mediapackage"]["endpoints"]["hls"]["url"],
-                    "dash": None,
                 },
                 "mp4": {},
                 "thumbnails": {},
@@ -542,7 +540,6 @@ def get_urls(self, obj):
 
         # Adaptive Bit Rate manifests
         urls["manifests"] = {
-            "dash": "{base:s}/cmaf/{stamp:s}.mpd".format(base=base, stamp=stamp),
             "hls": "{base:s}/cmaf/{stamp:s}.m3u8".format(base=base, stamp=stamp),
         }
 


Test patch:
diff --git a/src/backend/marsha/core/tests/test_api_video.py b/src/backend/marsha/core/tests/test_api_video.py
--- a/src/backend/marsha/core/tests/test_api_video.py
+++ b/src/backend/marsha/core/tests/test_api_video.py
@@ -191,10 +191,6 @@ def test_api_video_read_detail_token_user(self):
                     "mp4": mp4_dict,
                     "thumbnails": thumbnails_dict,
                     "manifests": {
-                        "dash": (
-                            "https://abc.cloudfront.net/a2f27fde-973a-4e89-8dca-cc59e01d255c/"
-                            "cmaf/1533686400.mpd"
-                        ),
                         "hls": (
                             "https://abc.cloudfront.net/a2f27fde-973a-4e89-8dca-cc59e01d255c/"
                             "cmaf/1533686400.m3u8"
@@ -1081,7 +1077,6 @@ def test_api_video_instructor_initiate_live(self):
                 "urls": {
                     "manifests": {
                         "hls": "https://channel_endpoint1/live.m3u8",
-                        "dash": None,
                     },
                     "mp4": {},
                     "thumbnails": {},
@@ -1222,7 +1217,6 @@ def test_api_video_instructor_start_live(self):
                 "urls": {
                     "manifests": {
                         "hls": "https://channel_endpoint1/live.m3u8",
-                        "dash": None,
                     },
                     "mp4": {},
                     "thumbnails": {},
@@ -1402,7 +1396,6 @@ def test_api_video_instructor_stop_live(self):
                 "urls": {
                     "manifests": {
                         "hls": "https://channel_endpoint1/live.m3u8",
-                        "dash": None,
                     },
                     "mp4": {},
                     "thumbnails": {},
diff --git a/src/backend/marsha/core/tests/test_views_lti_video.py b/src/backend/marsha/core/tests/test_views_lti_video.py
--- a/src/backend/marsha/core/tests/test_views_lti_video.py
+++ b/src/backend/marsha/core/tests/test_views_lti_video.py
@@ -209,7 +209,6 @@ def test_views_lti_video_instructor_live_mode_on(
                 "urls": {
                     "manifests": {
                         "hls": "https://channel_endpoint1/live.m3u8",
-                        "dash": None,
                     },
                     "mp4": {},
                     "thumbnails": {},
@@ -333,7 +332,6 @@ def test_views_lti_video_student_live_mode_on(
                 "urls": {
                     "manifests": {
                         "hls": "https://channel_endpoint1/live.m3u8",
-                        "dash": None,
                     },
                     "mp4": {},
                     "thumbnails": {},
@@ -546,8 +544,6 @@ def test_views_lti_video_read_other_playlist(
                         "thumbnails/1569309880_1080.0000000.jpg",
                     },
                     "manifests": {
-                        "dash": "https://abc.cloudfront.net/301b5f4f-b9f1-4a5f-897d-f8f1bf22c396/"
-                        "cmaf/1569309880.mpd",
                         "hls": "https://abc.cloudfront.net/301b5f4f-b9f1-4a5f-897d-f8f1bf22c396/"
                         "cmaf/1569309880.m3u8",
                     },
@@ -654,8 +650,6 @@ def test_views_lti_video_restricted_resolutions_list(
                         "thumbnails/1569309880_480.0000000.jpg",
                     },
                     "manifests": {
-                        "dash": "https://abc.cloudfront.net/59c0fc7a-0f64-46c0-993f-bdf47ecd837f/"
-                        "cmaf/1569309880.mpd",
                         "hls": "https://abc.cloudfront.net/59c0fc7a-0f64-46c0-993f-bdf47ecd837f/"
                         "cmaf/1569309880.m3u8",
                     },
@@ -772,8 +766,6 @@ def test_views_lti_video_post_student_with_video(
                         "thumbnails/1569309880_1080.0000000.jpg",
                     },
                     "manifests": {
-                        "dash": "https://abc.cloudfront.net/59c0fc7a-0f64-46c0-993f-bdf47ecd837f/"
-                        "cmaf/1569309880.mpd",
                         "hls": "https://abc.cloudfront.net/59c0fc7a-0f64-46c0-993f-bdf47ecd837f/"
                         "cmaf/1569309880.m3u8",
                     },
diff --git a/src/backend/marsha/core/tests/test_views_public_video.py b/src/backend/marsha/core/tests/test_views_public_video.py
--- a/src/backend/marsha/core/tests/test_views_public_video.py
+++ b/src/backend/marsha/core/tests/test_views_public_video.py
@@ -95,8 +95,6 @@ def test_video_publicly_accessible(self):
                         "thumbnails/1569309880_1080.0000000.jpg",
                     },
                     "manifests": {
-                        "dash": "https://abc.cloudfront.net/301b5f4f-b9f1-4a5f-897d-f8f1bf22c397/"
-                        "cmaf/1569309880.mpd",
                         "hls": "https://abc.cloudfront.net/301b5f4f-b9f1-4a5f-897d-f8f1bf22c397/"
                         "cmaf/1569309880.m3u8",
                     },
diff --git a/src/frontend/utils/tests/factories.ts b/src/frontend/utils/tests/factories.ts
--- a/src/frontend/utils/tests/factories.ts
+++ b/src/frontend/utils/tests/factories.ts
@@ -13,7 +13,6 @@ export const videoMockFactory = (video: Partial<Video> = {}): Video => ({
   upload_state: uploadState.READY,
   urls: {
     manifests: {
-      dash: 'https://example.com/dash',
       hls: 'https://example.com/hls',
     },
     mp4: {