lochmueller / html5videoplayer

TYPO3 CMS Extension - html5videoplayer
http://typo3.org/extensions/repository/view/html5videoplayer
7 stars 21 forks source link

Typo3 variable does not contain the source to my video I want to embed in my page #54

Open OAhlke1 opened 2 months ago

OAhlke1 commented 2 months ago

Hello Mr. Lochmueller,

I want to embed a video via a Typo3 script (which you will find below) so that the URL of the video is stored in a variable which is set as value for the src-attribute of the video-tag. The problem I am facing is now, that the variable is always empty, no matter what I do. I am using a Text&Media-field and my Typo3-Version is 13.2.1

Here is the script that ChatGPT generated for me:

page = PAGE

page {

  meta.author = BOK&Gaertner

  meta.description = Station5

  meta.viewport = width=device-width, initial-scale=1

  lib.rteText = CONTENT

  lib.rteText {

    table = tt_content

    select {

      pidInList = 9   # Die PID der Seite, auf der sich das Inhaltselement befindet

      colPos = 1      # Die Spalte, in der sich das Inhaltselement befindet

      uidInList = 39  # Die UID des Inhaltselements

    }

    renderObj = TEXT

    renderObj {

      field = bodytext  # Das Feld, das den RTE-Inhalt enthält

      parseFunc = < lib.parseFunc_RTE

      stripHtml = 1    # Entfernt HTML-Tags aus dem Text

    }

  }

  10 = FLUIDTEMPLATE

  10 {

    templateName = "Station5"

    layoutRootPaths.0 = EXT:site_package/Resources/Private/Layouts/

    partialRootPaths.0 = EXT:site_package/Resources/Private/Partials/

    templateRootPaths.0 = EXT:site_package/Resources/Private/Templates/

    variables {

      rteText < lib.rteText

      rteText.insertData = 1

    }

  }

  includeCSS {

    css = EXT:site_package/Resources/Public/Css/styles.css

    css1 = EXT:site_package/Resources/Public/Css/station5styles.css

  }

}

I really hope for your answer!

OAhlke1

lochmueller commented 2 months ago

Hey @OAhlke1 "my Typo3-Version is 13.2.1" -> The extension is for TYPO3 v11 max. Do you upgrade from a old version or why you want to handle EXT:html5videoplayer stuff in TYPO3 v13? Regards, Tim

OAhlke1 commented 2 months ago

Hi @lochmueller Well its because I am aware to the typical way of embedding a video to the video-tag via the src-attribute to be honest. I would be thankful for every help: which way would you to embed a video? And I started from scratch with version 13.2.1 :-)

Oh, and here is the HTML-snippet I ment:

<f:debug>{video}</f:debug>
<video controls>
  <source src="{video}" type="video/mp4">
  Your browser does not support the video tag.
</video>

But the debugger says, that video does not contain anything.

Thanks again for your reply :-)