refactor: Introduce VideoConfig service, move video sharing methods in it

refactor: Introduce VideoConfig service, move video sharing methods in it
This commit is contained in:
Muhammad Farhan Khan
2025-11-11 17:59:36 +05:00
committed by GitHub
9 changed files with 182 additions and 83 deletions

View File

@@ -18,6 +18,7 @@ from xblock.django.request import django_to_webob_request, webob_to_django_respo
from xblock.exceptions import NoSuchHandlerError
from xblock.runtime import KvsFieldData
from openedx.core.djangoapps.video_config.services import VideoConfigService
from xmodule.contentstore.django import contentstore
from xmodule.exceptions import NotFoundError, ProcessingError
from xmodule.modulestore.django import XBlockI18nService, modulestore
@@ -214,7 +215,8 @@ def _prepare_runtime_for_preview(request, block):
"teams_configuration": TeamsConfigurationService(),
"sandbox": SandboxService(contentstore=contentstore, course_id=course_id),
"cache": CacheService(cache),
'replace_urls': ReplaceURLService
'replace_urls': ReplaceURLService,
'video_config': VideoConfigService(),
}
block.runtime.get_block_for_descriptor = partial(_load_preview_block, request)