Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Data Dictionary » Subtype video
Subtype video [message #5479] Fri, 15 April 2016 10:00 Go to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
Hi Tony,

is there a possibility to store a video path (i.e. *.mp4) and play it? Eventually a similiar way like the image subtype in association with the filepicker task.
Re: Subtype video [message #5481 is a reply to message #5479] Fri, 15 April 2016 12:14 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
I'm afraid not. There has never been a need to play a video in an administrative application.

Re: Subtype video [message #5483 is a reply to message #5481] Sat, 16 April 2016 04:02 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
I have an application for creating training plans. If I choose an exercise I can see a picture with the exercise. I now want to show a video with the exercise, too.
Do you have an idea how to realisze that?
Re: Subtype video [message #5484 is a reply to message #5483] Sat, 16 April 2016 05:36 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
What HTML output would be required to show a video?

Re: Subtype video [message #5487 is a reply to message #5484] Sat, 16 April 2016 07:29 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
What do you mean with output? How it should look like? (thumbnail as image with arrow to play the video)
Or HTML tag 'video' specifications?
Re: Subtype video [message #5490 is a reply to message #5487] Sat, 16 April 2016 13:30 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
I mean what tags are necessary in the HTML output to show a video?

Re: Subtype video [message #5506 is a reply to message #5490] Fri, 22 April 2016 06:28 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
I think the HTML output should be like the following sample:

<video id="sampleMovie" width="640" height="360" preload controls>
<source src="HTML5Sample_H264.mov" />
<source src="HTML5Sample_Ogg.ogv" />
<source src="HTML5Sample_WebM.webm" />
</video>

I read a little bit about playing video on the web and do now know that it is not simple. I hope that you have the information/answer which you wanted.
Re: Subtype video [message #5511 is a reply to message #5506] Sat, 23 April 2016 03:52 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
Thanks. I will look into it for a future release.

Re: Subtype video [message #5512 is a reply to message #5511] Sat, 23 April 2016 06:33 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
thank you in advance. Have a nice weekend.
Re: Subtype video [message #5588 is a reply to message #5511] Wed, 01 June 2016 10:51 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
Great job! I just tried it out and it looks very good! Thank you very much.
Re: Subtype video [message #5595 is a reply to message #5588] Thu, 02 June 2016 03:43 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
You are welcome. When I investigated the HTML code for playing videos I was amazed at the number of options, so I decided to stick with the simplest in the hope that it worked. It sems from your reaction that my efforts were not wasted.

Re: Subtype video [message #5596 is a reply to message #5595] Thu, 02 June 2016 04:29 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
Not at all! I just try to figure out the options and possibilites.

I just read the FAQ 133 how to display images and videos. I attached a screenshot with the new video field. There you can see the control bar. How can I prevent this?

The next thing is that the subtype video requires a filepicker task. Images are normally in a subdirectory on the same server. But what, if videos reside on a different server. Is there a possibilty to only insert the https://path_to_video...? I can insert it manually. But if I insert a YouTube path with no video type ending I get an error that the specification for subtype video is 'indvalid'.

Last but not least: Is there a possiblity in one of the next Radicore versions to insert a control for slow-motion (i.e. x %) and/or for jumping back x seconds? This would be great for me.

Thanks in advance for your efforts.

[Updated on: Thu, 02 June 2016 04:30]

Report message to a moderator

Re: Subtype video [message #5599 is a reply to message #5596] Fri, 03 June 2016 05:08 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
You must remember that RADICORE was designed to build business-facing administrative/enterprise applications, not public-facing web sites, and in such applications it is simply not done to display content which exists on a different server. For security purposes the entire application sits behind a firewall, so accessing and displaying content from servers which are outside of this firewall is a complete no-no.

If you are using RADICORE for your back-end application it is also possible for you to have a separate front-end web site which is accessible by the public. In this case it is not usual to continue using the Presentation Layer components within RADICORE where all the HTML screens are constructed from XML and XSL style sheets, but instead to construct your HTML pages via alternative means. In this case you have complete control over whatever HTML/CSS/JavaScript you use and you are not resticted by whatever RADICORE can or cannot do.

When I have the time I will look into some of the options you have mentioned to see if I can add them to the framework, but as you are the only one who has made this request it will not be high on my list of priorities.


[Updated on: Fri, 03 June 2016 05:09]

Report message to a moderator

Re: Subtype video [message #5600 is a reply to message #5599] Fri, 03 June 2016 06:07 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
Thanks for your answer. I do understand what you mentioned why and how RADICORE was designed. I want to build an an administrative application too. It consists of organisation, training/workout and analytics.

In the workout area there are exercises which are explained by text and with an image. So far no problem. But I want that the exercises can be seen on a video for better understanding what and how to do. I agree to you that playing a video from a different server is a tricky thing. But I have the problem with video rights. These videos can only be seen and played by users of my application. For this reason it would be very convenient. The other reason is that I have stored some videos on YouTube because it is free of charge. But I do know that you have to insert some code for playing YouTube videos.

I am definitely happy that you created the video subtype because I now have a possibility to play videos at all. I think I will limit the upload size and store them in a subdirectory as long as I have space enough. Wink
Re: Subtype video [message #5602 is a reply to message #5599] Sat, 04 June 2016 06:59 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
Inserting the path of a mp4 (mov, ogv) file generates the error message: specification for 'subtype' is invalid. Do I have to change something else in the data dictionary or somewhere else?
Re: Subtype video [message #5603 is a reply to message #5602] Sun, 05 June 2016 05:34 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
I tested this using an mp4 file without issue. This is what I had in my code:
$this->fieldspec['video_id']        = array('type' => 'string',
                                            'size' => 255,
                                            'subtype' => 'video',
                                            'preload' => 'y',
                                            'imageheight' => 360,
                                            'imagewidth' => 640,
                                            'control' => 'filepicker',
                                            'task_id' => 'video(filepicker)');

The file that I loaded in and displayed was called 'videos\mov_bbb.mp4'.


Re: Subtype video [message #5605 is a reply to message #5603] Sun, 05 June 2016 13:51 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
I have the same code in my dict.inc file. I think I have to look further in my application for the error reason.
Re: Subtype video [message #5607 is a reply to message #5605] Mon, 06 June 2016 03:35 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
Is it possible that you changed something in a framework file after creating the version v1.95.0? The only difference between your and my code in the dict.inc file is the 'preload' attribute. In the Data dictionary there is no field where I can choose yes or no and this attribute isn't generated automatically. Even if I change the file name ending to png or jpg the same error message comes up.
Re: Subtype video [message #5609 is a reply to message #5607] Mon, 06 June 2016 05:54 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
When/where is this error message being generated? I am trying to duplicate this error in my code, but I can't find where it could be generated.

Re: Subtype video [message #5612 is a reply to message #5609] Wed, 08 June 2016 05:03 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
The error is generated when I press the submit button to store the path in the database. Attached you find a screen shot of this column specification.
Re: Subtype video [message #5614 is a reply to message #5612] Wed, 08 June 2016 08:01 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
I have found and fixed the problem in the attached file. When the subtype is 'video' I have also allowed it to allow file paths which begin with 'http' so you can access videos from external sources, such as on YouTube.

Re: Subtype video [message #5617 is a reply to message #5614] Wed, 08 June 2016 09:48 Go to previous messageGo to next message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
Thank you very much for fixing the problem that fast. I can now save the file path without problems, even paths from different servers. Great job!
What I didn't see is that the youtube path isn't a path with 'video'-ending such as mp4 or avi. It's just a path with characters and numbers such as https://youtu.be/PC0kg5...
Do you have any idea how to realize that?
Re: Subtype video [message #5619 is a reply to message #5617] Thu, 09 June 2016 04:58 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
I'm afraid I have no clue as to how you can access a YouTube video if the URL does not include a file name.

Re: Subtype video [message #5651 is a reply to message #5596] Mon, 20 June 2016 05:51 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
You wrote: "Is there a possiblity in one of the next Radicore versions to insert a control for slow-motion (i.e. x %) and/or for jumping back x seconds? This would be great for me."

This is not possible with standard HTML markup. The "<video>" tag has the "controls" option which will show only the standard controls (play, pause, etc). According to what I have read at http://www.html5rocks.com/en/tutorials/video/basics/ it is possible to add other controls using javascript and css, but that you will have to do manually.


Re: Subtype video [message #5652 is a reply to message #5651] Mon, 20 June 2016 10:16 Go to previous message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
Thank you for the information. I will read the article and then see if I can handle this.
Previous Topic: One subsystem with differents database names
Next Topic: Introduction to Radicore's Data Dictionary
Goto Forum:
  


Current Time: Mon Nov 18 03:51:00 EST 2024

Total time taken to generate the page: 0.04443 seconds