@@ -64,6 +64,46 @@ class Transcoder extends Plugin
6464 */
6565 public static $ settings ;
6666
67+ // Static Methods
68+ // =========================================================================
69+
70+ /**
71+ * @inheritdoc
72+ */
73+ public function __construct ($ id , $ parent = null , array $ config = [])
74+ {
75+ $ config ['components ' ] = [
76+ 'transcode ' => Transcode::class,
77+ // Register the manifest service
78+ 'manifest ' => [
79+ 'class ' => ManifestService::class,
80+ 'assetClass ' => TranscoderAsset::class,
81+ 'devServerManifestPath ' => 'http://craft-transcoder-buildchain:8080/ ' ,
82+ 'devServerPublicPath ' => 'http://craft-transcoder-buildchain:8080/ ' ,
83+ ],
84+ ];
85+
86+ parent ::__construct ($ id , $ parent , $ config );
87+ }
88+
89+ // Public Properties
90+ // =========================================================================
91+
92+ /**
93+ * @var string
94+ */
95+ public $ schemaVersion = '1.0.0 ' ;
96+
97+ /**
98+ * @var bool
99+ */
100+ public $ hasCpSection = false ;
101+
102+ /**
103+ * @var bool
104+ */
105+ public $ hasCpSettings = false ;
106+
67107 // Public Methods
68108 // =========================================================================
69109
@@ -137,14 +177,6 @@ protected function createSettingsModel()
137177 */
138178 protected function addComponents ()
139179 {
140- // Register the manifest service
141- $ this ->set ('manifest ' , [
142- 'class ' => ManifestService::class,
143- 'assetClass ' => TranscoderAsset::class,
144- 'devServerManifestPath ' => 'http://craft-transcoder-buildchain:8080/ ' ,
145- 'devServerPublicPath ' => 'http://craft-transcoder-buildchain:8080/ ' ,
146- ]);
147-
148180 // Register our variables
149181 Event::on (
150182 CraftVariable::class,
@@ -250,8 +282,6 @@ function (RegisterUrlRulesEvent $event) {
250282 protected function customFrontendRoutes (): array
251283 {
252284 return [
253- // Make webpack async bundle loading work out of published AssetBundles
254- '/cpresources/transcoder/<resourceType:{handle}>/<fileName> ' => 'transcoder/manifest/resource ' ,
255285 ];
256286 }
257287}
0 commit comments