Mastering TS Net

Sannyasin Brahmanathaswami brahma at hindu.org
Thu Jul 5 13:45:31 EDT 2018


With TSGetNet, is it possible to just get the "status code" ("200" is good, "404" it bad, among other things)

Of a file on a webserver, *before* you download it? If it is a 404 you "bail on the operation", in form the user "Not Found"  but if it is 200, continue to stream it?

Brahmanathaswami
 

On 7/2/18, 5:19 AM, "use-livecode on behalf of Sannyasin Brahmanathaswami via use-livecode" <use-livecode-bounces at lists.runrev.com on behalf of use-livecode at lists.runrev.com> wrote:

    I looked at the lesson. Quite good!
    
    I think one more lesson may be useful. 
    
    In my case I will use a "slide show"  as a use case.
    
    (But there others, thinking of streaming music playlist)
    
    1) Assume you have the URLs for a slideshow; 
    2) you fetch this by calling JSON/Text file with the urls for a slide show which exists on the server.
    3) Let say you have 100 slides/URLs
    4) Galleria (our web app jquery/html5) uses "lazyload 3" parameter, which asynchronously loads the next the 3 slides (besides the one you are viewing) in the background, then users view the next slide (already downloaded) -there is no delay.
    
    So, with TSNetGet
    
    How would set this up Livecode?
    
    You don't want to "overwhelm" the phone with async calls to 100 connections/slide. (Galleria suggests "3")
    
    But there is the advantage of taking the call back message,  get 3 at a time, store them in the documents folder, finally the user has the slides show on his phone, later he can view it off line. 
    
    At the retrieval of the 100th slide, then we informed the user "Slideshow is download complete."
    
    It the user "bails" on slide 36, when he comes back again. TSNetGet starts over but the only which slide 37.
    
    That last part may not want to part of your lessons. Though it would be easy enough to check "these is a file" and if it is true, then TSGetNet, so "next repeat" without downloading.
    
    I could work this out myself, but is such a common use case, everyone would benefit from it.
    
    Brahmanathaswami
     
    
    On 7/1/18, 3:40 PM, "use-livecode on behalf of Charles Warwick via use-livecode" <use-livecode-bounces at lists.runrev.com on behalf of use-livecode at lists.runrev.com> wrote:
    
        If you can’t quite find an example lesson that answers what you need, let me know and I will get one organised.
    
    _______________________________________________
    use-livecode mailing list
    use-livecode at lists.runrev.com
    Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
    http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list