I can't answer without understanding what you exactly like to do and why you need a textobject class similar class. Generally if it is theme specific it should be part of the theme which is of course problematic since file types are core domain. Perhaps mail me directly about this.
Vince:
You can create a class in your theme functions.php. Then this class will be present for your theme (and only your theme.) If it is really similar to class-textobject I suggest you make it a descendent of that class. E.G. class my-textobject extends class-textobject. Then you need to define only those methods which need to be different.
Vincent,
Thanks so much for your efforts, (and the rest of the ZP crew that are helping).
If you need any help testing just shoot me an email. I have everything running locally on Xampp so I can test easily.
I've been following along, because of my interest. I'm hoping your coding for handling YouTube video?
I have hosted my own mp4's on my shared server in the past and the playback is always terrible. That's why I switched to Youtube which is very robust and it's free.
You can create playlists in your YouTube account, and if you use the proper embed code, your playlist is available in a popup menu on the screen.

BTW I really like the zpBootstrap theme. Works so well on all devices.
Seems like Fancybox & Bootstrap are both adaptable for YouTube vids, but I don't understand coding, so I am no help.
@acrylian: I have to get the src content in the txt file content (of course, if that file have an embed code to online video like ``)
@sbillard:
thanks for the tip.
I tried it but in fact it doesn't work as exepected: if I add a class in my function.php file, relevant objects are not seen in admin (ie: for ordering pictures or to edit them)
so, as I don't want to create a sidecar plugin for my theme, I found another solution (really more simple!): create a local function to suit my needs.
@tplowe56: Of course, I know my theme works on all devices (I created it for that!).
I am working to improve it to manage Youtube and Vimeo online video and to see them in Fancybox.
be patient, and of course fell free to "buy me a beer" (donate link: https://www.vincentbourganel.fr/pages/zpbootstrap-2.2/).
I need to test little more and package my improvement, but you can the the result here: https://test.vincentbourganel.fr/images/illustrations/.
a click on the thumb enable to see the video with fancybox and a click on the video name (youtube or vimeo) enable to see it in image page with responsive behavior.
@acrylian:
I don't need to get the url of the txt file itself, but I have to get the src in the txt file content, following the tip (https://www.zenphoto.org/news/using-external-sources/#--using-videos-from-youtube-or-other-portals).
I created a personnal function for that, and it works fine.
Have a closest look to my previous post.
the text file content have to follow the patern:
with getContent(), I get the code above and I have to do text manipulation to only get src value (I only want to get //www.youtube.com/embed/M7lc1UVf-VE?autoplay=1&rel=0).
but nevermind, I got the right code and it works.
as far I can see, the tip for online video managed by textobject requires to store the full embeded code, not only a link to the video.
and each online reader (youtube, vimeo, dailymotion,...) have their own reader configuration in the iframe parameters.
zpBootstrap now supports video online (Youtube and Vimeo):
More info here: https://www.vincentbourganel.fr/news/nouveaute-zpbootstrap-prends-charge-les-video-online-youtube-et-vimeo-/
sorry, there was a wrong url.
tyhe right one : https://www.vincentbourganel.fr/news/new-zpbootstrap-supports-video-online/